<?xml version="1.0" encoding="UTF-8" ?>
<DataIntegratorExport repositoryVersion="12.2.2.0000" productVersion="12.2.3.2">
<DIDatabaseDatastore name="DW_METADATA_DS" typeId="3" >
<DIAttributes>
<DIAttribute name="DBLiveLoad" value="no"/>
<DIAttribute name="application_type" value="Custom"/>
<DIAttribute name="cdc_enabled" value="no"/>
<DIAttribute name="datastore_repotype" value="local"/>
<DIAttribute name="ds_configuration_enabled" value="yes"/>
<DIAttribute name="ds_configurations" hasNestedXMLTree ="true">

<DSConfigurations>
<DSConfiguration default="true" name="Default">
<case_sensitive>no</case_sensitive>
<database_type>Microsoft_SQL_Server</database_type>
<db_alias_name1>DW_METADATA_ALIAS</db_alias_name1>
<db_alias_user1>dwmetadata</db_alias_user1>
<loader_xact_size>1000</loader_xact_size>
<locale_codepage>&lt;default&gt;</locale_codepage>
<locale_language>&lt;default&gt;</locale_language>
<locale_territory>&lt;default&gt;</locale_territory>
<mssql_windows_authentication>no</mssql_windows_authentication>
<password>;085A6DF93DA01ED1DEA3BB1DC1D656C0EF56E65913FB53605B75804428674DE2</password>
<sql_server_database>XsStaging</sql_server_database>
<sql_server_dataserver>localhost,1433</sql_server_dataserver>
<sql_server_version>Microsoft SQL Server 2005</sql_server_version>
<user>dwmetadata</user>
</DSConfiguration>
</DSConfigurations>

</DIAttribute>
<DIAttribute name="enable_data_transfer" value="yes"/>
<DIAttribute name="import_unknown_type" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="unknown_type_size" value="255"/>
</DIAttributes>
</DIDatabaseDatastore>
<DIDatabaseDatastore name="DW_ABC_DS" typeId="3" >
<DIAttributes>
<DIAttribute name="DBLiveLoad" value="no"/>
<DIAttribute name="application_type" value="Custom"/>
<DIAttribute name="cdc_enabled" value="no"/>
<DIAttribute name="datastore_repotype" value="local"/>
<DIAttribute name="ds_configuration_enabled" value="yes"/>
<DIAttribute name="ds_configurations" hasNestedXMLTree ="true">

<DSConfigurations>
<DSConfiguration default="true" name="Default">
<case_sensitive>no</case_sensitive>
<database_type>Microsoft_SQL_Server</database_type>
<db_alias_name1>DW_ABC_ALIAS</db_alias_name1>
<db_alias_user1>dwabc</db_alias_user1>
<loader_xact_size>1000</loader_xact_size>
<locale_codepage>&lt;default&gt;</locale_codepage>
<locale_language>&lt;default&gt;</locale_language>
<locale_territory>&lt;default&gt;</locale_territory>
<mssql_windows_authentication>no</mssql_windows_authentication>
<password>;89770408927C5ECAB76D9855E0DA5FE4F25B0E2949263E3397D5BD72B1A30930</password>
<sql_server_database>XsStaging</sql_server_database>
<sql_server_dataserver>localhost,1433</sql_server_dataserver>
<sql_server_version>Microsoft SQL Server 2005</sql_server_version>
<user>dwabc</user>
</DSConfiguration>
</DSConfigurations>

</DIAttribute>
<DIAttribute name="enable_data_transfer" value="yes"/>
<DIAttribute name="import_unknown_type" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="unknown_type_size" value="255"/>
</DIAttributes>
</DIDatabaseDatastore>
<DIDatabaseDatastore name="SRCSTAGING_DS" typeId="3" >
<DIAttributes>
<DIAttribute name="DBLiveLoad" value="no"/>
<DIAttribute name="application_type" value="Custom"/>
<DIAttribute name="cdc_enabled" value="no"/>
<DIAttribute name="datastore_repotype" value="local"/>
<DIAttribute name="ds_configuration_enabled" value="yes"/>
<DIAttribute name="ds_configurations" hasNestedXMLTree ="true">

<DSConfigurations>
<DSConfiguration default="true" name="Default">
<case_sensitive>no</case_sensitive>
<database_type>Microsoft_SQL_Server</database_type>
<db_alias_name1>SRCSTAGING_ALIAS</db_alias_name1>
<db_alias_user1>dws</db_alias_user1>
<loader_xact_size>1000</loader_xact_size>
<locale_codepage>&lt;default&gt;</locale_codepage>
<locale_language>&lt;default&gt;</locale_language>
<locale_territory>&lt;default&gt;</locale_territory>
<mssql_windows_authentication>no</mssql_windows_authentication>
<password>;085A6DF93DA01ED1DEA3BB1DC1D656C0EF56E65913FB53605B75804428674DE2</password>
<sql_server_database>XsStaging</sql_server_database>
<sql_server_dataserver>localhost,1433</sql_server_dataserver>
<sql_server_version>Microsoft SQL Server 2005</sql_server_version>
<user>dws</user>
</DSConfiguration>
</DSConfigurations>

</DIAttribute>
<DIAttribute name="enable_data_transfer" value="yes"/>
<DIAttribute name="import_unknown_type" value="no"/>
<DIAttribute name="name" value="SRCSTAGING_DS"/>
<DIAttribute name="unknown_type_size" value="255"/>
</DIAttributes>
</DIDatabaseDatastore>
<DITable name="DataSourceConnection" owner="dwmetadata" datastore="DW_METADATA_DS" database="XsStaging" description="" >
<DIProperties>
<DIAttribute name="Table_Type" value="TABLE" />
<DIAttribute name="Estimated_Row_Count" value="50000" />
<DIAttribute name="Loader_Is_Template_Table" value="no" />
<DIAttribute name="db_alias_name" value="DW_METADATA_ALIAS" />
</DIProperties>
<DIColumn name="Hjid" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="Hjtype" datatype="VARCHAR" size="255" nullable="false" >
</DIColumn>
<DIColumn name="ProductType" datatype="VARCHAR" size="50" nullable="true" >
</DIColumn>
<DIColumn name="ProductName" datatype="VARCHAR" size="50" nullable="true" >
</DIColumn>
<DIColumn name="TimeZone" datatype="VARCHAR" size="255" nullable="true" >
</DIColumn>
<DIColumn name="ProductVersion" datatype="VARCHAR" size="10" nullable="true" >
</DIColumn>
<DIColumn name="CP_ID" datatype="DECIMAL" precision="19" scale="0" nullable="true" >
</DIColumn>
<DIPrimaryKey>
<DIPrimaryKeyColumn name="Hjid" />
</DIPrimaryKey>
<DITableIndex name="PK_DATASOURCECONNECTION" unique="true">
<DIIndexColumn name="Hjid" />
</DITableIndex>
</DITable>
<DITable name="DW_CONFIGURATION" owner="dwmetadata" datastore="DW_METADATA_DS" database="XsStaging" description="" >
<DIProperties>
<DIAttribute name="Table_Type" value="TABLE" />
<DIAttribute name="Estimated_Row_Count" value="50000" />
<DIAttribute name="Loader_Is_Template_Table" value="no" />
<DIAttribute name="db_alias_name" value="DW_METADATA_ALIAS" />
</DIProperties>
<DIColumn name="ID" datatype="DECIMAL" precision="10" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="PROPERTY_NAME" datatype="VARCHAR" size="30" nullable="true" >
</DIColumn>
<DIColumn name="PROPERTY_VALUE" datatype="VARCHAR" size="255" nullable="true" >
</DIColumn>
</DITable>
<DITable name="FILE_LOCATION_INFO" owner="dwmetadata" datastore="DW_METADATA_DS" database="XsStaging" description="" >
<DIProperties>
<DIAttribute name="Table_Type" value="TABLE" />
<DIAttribute name="Estimated_Row_Count" value="50000" />
<DIAttribute name="Loader_Is_Template_Table" value="no" />
<DIAttribute name="db_alias_name" value="DW_METADATA_ALIAS" />
</DIProperties>
<DIColumn name="ID" datatype="DECIMAL" precision="10" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="SOURCE" datatype="VARCHAR" size="30" nullable="true" >
</DIColumn>
<DIColumn name="FILE_LOCATION" datatype="VARCHAR" size="200" nullable="true" >
</DIColumn>
</DITable>
<DITable name="INSTRUCTION" owner="dwabc" datastore="DW_ABC_DS" database="XsStaging" description="" >
<DIProperties>
<DIAttribute name="Table_Type" value="TABLE" />
<DIAttribute name="Estimated_Row_Count" value="50000" />
<DIAttribute name="Loader_Is_Template_Table" value="no" />
<DIAttribute name="Total_Number_Of_Rows_Processed" value="1" />
<DIAttribute name="Number_Of_Rows_Rejected" value="0" />
<DIAttribute name="Number_Of_Inserts" value="Cannot track number of inserts, updates or deletes for AutoCorrect Loads" />
<DIAttribute name="Number_Of_Updates" value="Cannot track number of inserts, updates or deletes for AutoCorrect Loads" />
<DIAttribute name="Number_Of_Deletes" value="Cannot track number of inserts, updates or deletes for AutoCorrect Loads" />
<DIAttribute name="Elapsed_Time_For_Load" value="1 Seconds" />
<DIAttribute name="db_alias_name" value="DW_ABC_ALIAS" />
</DIProperties>
<DIColumn name="INSTRUCTION_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" nullable="false" >
</DIColumn>
<DIColumn name="PRODUCT_ID" datatype="DECIMAL" precision="10" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="PRODUCT_NAME" datatype="VARCHAR" size="100" nullable="false" >
</DIColumn>
<DIColumn name="PRODUCT_VERSION" datatype="VARCHAR" size="30" nullable="false" >
</DIColumn>
<DIColumn name="PRODUCT_TYPE" datatype="VARCHAR" size="30" nullable="false" >
</DIColumn>
<DIColumn name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" nullable="true" >
</DIColumn>
<DIColumn name="INST_ENTITY" datatype="VARCHAR" size="30" nullable="false" >
</DIColumn>
<DIColumn name="INST_FIELDS" datatype="VARCHAR" size="250" nullable="true" >
</DIColumn>
<DIColumn name="INST_CRITERIA" datatype="VARCHAR" size="250" nullable="true" >
</DIColumn>
<DIColumn name="INST_ORDER_BY" datatype="VARCHAR" size="50" nullable="true" >
</DIColumn>
<DIColumn name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" nullable="false" >
</DIColumn>
<DIColumn name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" nullable="true" >
</DIColumn>
<DIColumn name="FIELD_DELIMITER" datatype="VARCHAR" size="10" nullable="true" >
</DIColumn>
<DIColumn name="ROW_DELIMITER" datatype="VARCHAR" size="10" nullable="true" >
</DIColumn>
<DIColumn name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" nullable="true" >
</DIColumn>
<DIColumn name="ENCODING" datatype="VARCHAR" size="30" nullable="true" >
</DIColumn>
<DIColumn name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" nullable="false" >
</DIColumn>
<DIColumn name="INST_TIME_STAMP" datatype="DATETIME" nullable="false" >
</DIColumn>
<DIPrimaryKey>
<DIPrimaryKeyColumn name="INSTRUCTION_ID" />
</DIPrimaryKey>
<DITableIndex name="PK_INSTRUCTION" unique="true">
<DIIndexColumn name="INSTRUCTION_ID" />
</DITableIndex>
</DITable>
<DIScriptFunction name="ABC_ENDJB_FN" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="#UPDATE STEP_RUNTIME RECORD WITH SUCCESS STATUS AND END TIME&#xA;#GET JOB_ID&#xA;&#xA;$l_status = 'SUCCESS';&#xA;#$now = sysdate();&#xA;&#xA;$l_wf_failed_count = sql('DW_ABC_DS',' select count(status) from JOB_STREAM_STEP_DETAIL_RT&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND (status = \'ERROR\' or status = \'MAX_EXECUTION_TIME_EXCEEDED\')');&#xA;ETL_PRINT( '**     wf_failed_count = {$l_wf_failed_count}' );&#xA;&#xA;$l_wf_success_count = sql('DW_ABC_DS',' select count(status) from JOB_STREAM_STEP_DETAIL_RT&#xA;                     where MD_PROCESS_ID = {$p_process_id} AND status = \'SUCCESS\'');&#xA;ETL_PRINT( '**     wf_success_count = {$l_wf_success_count}' );&#xA;&#xA;$l_am_failed_count = sql('DW_ABC_DS',' select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND (status = \'ERROR\' or status = \'MAX_EXECUTION_TIME_EXCEEDED\')');&#xA;ETL_PRINT( '**     am_failed_count = {$l_am_failed_count}' );&#xA;&#xA;$l_am_warning_count = sql('DW_ABC_DS',' select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND status = \'WARNING\'');&#xA;ETL_PRINT( '**     am_warning_count = {$l_am_warning_count}' );&#xA;&#xA;$l_am_success_count = sql('DW_ABC_DS',' select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND status = \'SUCCESS\'');&#xA;ETL_PRINT( '**     am_success_count = {$l_am_success_count}' );&#xA;&#xA;$l_status_info = 'WFs statuses: success: ' || $l_wf_success_count || ', error: '  || $l_wf_failed_count ||' || Audit metrics: success: ' || $l_am_success_count || ', warning: ' || $l_am_warning_count || ', error: ' || $l_am_failed_count || '.';&#xA;&#xA;if ($l_wf_failed_count &gt; 0)&#xA;begin&#xA;&#x9;$l_status = 'ERROR';&#xA;&#x9;$l_reco_action =  'Drill to WF level to access the error message. ';&#xA;end&#x9;&#xA;else if ($l_am_failed_count &gt; 0)&#xA;begin&#xA;&#x9;$l_status = 'ERROR'; &#xA;&#x9;$l_reco_action = $l_reco_action || 'Refer to failed metrics. ';&#xA;end&#xA;else if ($l_am_warning_count &gt; 0)&#xA;begin&#xA;&#x9;$l_status = 'WARNING';&#xA;&#x9;$l_reco_action = $l_reco_action || 'Check WARNING metrics. ';&#xA;end&#xA;&#xA;&#xA;#sql('DW_ABC_DS','update JOB_STREAM_STEP_RT&#xA;#               set STATUS = {$l_status}, STATE = \'FINISHED\' , END_TIME = {sysdate()}, STATUS_INFO = {$l_status_info}, RECO_ACTION = {$l_reco_action}&#xA;#               where MD_PROCESS_ID = {$p_process_id}');&#xA;&#xA;sql('DW_ABC_DS','update JOB_STREAM_STEP_RT&#xA;               set STATUS = {$l_status}, STATE = \'FINISHED\' , END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127), STATUS_INFO = {$l_status_info}, RECO_ACTION = {$l_reco_action}&#xA;               where MD_PROCESS_ID = {$p_process_id}');&#xA;ETL_PRINT( '**' );&#xA;ETL_PRINT( '**' );&#xA;ETL_PRINT( '** The Job {job_name()} is ending' );&#xA;ETL_PRINT( '**   status: {$l_status}' );&#xA;ETL_PRINT( '**   explanation: {$l_status_info})' );&#xA;ETL_PRINT( '********************************' );&#xA;ETL_PRINT( '********************************' );&#xA;&#xA;return NULL;&#xA;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$p_process_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$l_wf_failed_count" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_status" datatype="VARCHAR" size="10" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_wf_success_count" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_status_info" datatype="VARCHAR" size="400" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_am_failed_count" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_am_warning_count" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_am_success_count" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_reco_action" datatype="VARCHAR" size="4000" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="INT" />
<DISteps>
<DIAssignmentStep typeId="12" variable="$l_status" >
<DIExpression isString="true" expr="'SUCCESS'" >
<CONSTANT value="SUCCESS" datatype="VARCHAR" size="7" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$l_wf_failed_count" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', ' select count(status) from JOB_STREAM_STEP_DETAIL_RT&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND (status = \'ERROR\' or status = \'MAX_EXECUTION_TIME_EXCEEDED\')')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value=" select count(status) from JOB_STREAM_STEP_DETAIL_RT&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND (status = 'ERROR' or status = 'MAX_EXECUTION_TIME_EXCEEDED')" datatype="VARCHAR" size="175" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**     wf_failed_count = {$l_wf_failed_count}')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**     wf_failed_count = {$l_wf_failed_count}" datatype="VARCHAR" size="45" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$l_wf_success_count" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', ' select count(status) from JOB_STREAM_STEP_DETAIL_RT&#xA;                     where MD_PROCESS_ID = {$p_process_id} AND status = \'SUCCESS\'')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value=" select count(status) from JOB_STREAM_STEP_DETAIL_RT&#xA;                     where MD_PROCESS_ID = {$p_process_id} AND status = 'SUCCESS'" datatype="VARCHAR" size="134" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**     wf_success_count = {$l_wf_success_count}')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**     wf_success_count = {$l_wf_success_count}" datatype="VARCHAR" size="47" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$l_am_failed_count" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', ' select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND (status = \'ERROR\' or status = \'MAX_EXECUTION_TIME_EXCEEDED\')')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value=" select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND (status = 'ERROR' or status = 'MAX_EXECUTION_TIME_EXCEEDED')" datatype="VARCHAR" size="162" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**     am_failed_count = {$l_am_failed_count}')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**     am_failed_count = {$l_am_failed_count}" datatype="VARCHAR" size="45" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$l_am_warning_count" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', ' select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND status = \'WARNING\'')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value=" select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND status = 'WARNING'" datatype="VARCHAR" size="120" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**     am_warning_count = {$l_am_warning_count}')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**     am_warning_count = {$l_am_warning_count}" datatype="VARCHAR" size="47" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$l_am_success_count" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', ' select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND status = \'SUCCESS\'')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value=" select count(status) from AUDIT_METRIC&#xA;                    where MD_PROCESS_ID = {$p_process_id} AND status = 'SUCCESS'" datatype="VARCHAR" size="120" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**     am_success_count = {$l_am_success_count}')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**     am_success_count = {$l_am_success_count}" datatype="VARCHAR" size="47" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$l_status_info" >
<DIExpression isString="true" expr="(((((((((('WFs statuses: success: ' || $l_wf_success_count) || ', error: ') || $l_wf_failed_count) || ' || Audit metrics: success: ') || $l_am_success_count) || ', warning: ') || $l_am_warning_count) || ', error: ') || $l_am_failed_count) || '.')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="WFs statuses: success: " datatype="VARCHAR" size="23" />
<VARIABLE_REFERENCE name="$l_wf_success_count" />
</CONCAT>
<CONSTANT value=", error: " datatype="VARCHAR" size="9" />
</CONCAT>
<VARIABLE_REFERENCE name="$l_wf_failed_count" />
</CONCAT>
<CONSTANT value=" || Audit metrics: success: " datatype="VARCHAR" size="28" />
</CONCAT>
<VARIABLE_REFERENCE name="$l_am_success_count" />
</CONCAT>
<CONSTANT value=", warning: " datatype="VARCHAR" size="11" />
</CONCAT>
<VARIABLE_REFERENCE name="$l_am_warning_count" />
</CONCAT>
<CONSTANT value=", error: " datatype="VARCHAR" size="9" />
</CONCAT>
<VARIABLE_REFERENCE name="$l_am_failed_count" />
</CONCAT>
<CONSTANT value="." datatype="VARCHAR" size="1" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($l_wf_failed_count &gt; 0)" >
<LOGICAL_OP op="GT">
<VARIABLE_REFERENCE name="$l_wf_failed_count" />
<CONSTANT value="0" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$l_status" >
<DIExpression isString="true" expr="'ERROR'" >
<CONSTANT value="ERROR" datatype="VARCHAR" size="5" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$l_reco_action" >
<DIExpression isString="true" expr="'Drill to WF level to access the error message. '" >
<CONSTANT value="Drill to WF level to access the error message. " datatype="VARCHAR" size="47" />
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($l_am_failed_count &gt; 0)" >
<LOGICAL_OP op="GT">
<VARIABLE_REFERENCE name="$l_am_failed_count" />
<CONSTANT value="0" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$l_status" >
<DIExpression isString="true" expr="'ERROR'" >
<CONSTANT value="ERROR" datatype="VARCHAR" size="5" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$l_reco_action" >
<DIExpression isString="true" expr="($l_reco_action || 'Refer to failed metrics. ')" >
<CONCAT>
<VARIABLE_REFERENCE name="$l_reco_action" />
<CONSTANT value="Refer to failed metrics. " datatype="VARCHAR" size="25" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($l_am_warning_count &gt; 0)" >
<LOGICAL_OP op="GT">
<VARIABLE_REFERENCE name="$l_am_warning_count" />
<CONSTANT value="0" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$l_status" >
<DIExpression isString="true" expr="'WARNING'" >
<CONSTANT value="WARNING" datatype="VARCHAR" size="7" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$l_reco_action" >
<DIExpression isString="true" expr="($l_reco_action || 'Check WARNING metrics. ')" >
<CONCAT>
<VARIABLE_REFERENCE name="$l_reco_action" />
<CONSTANT value="Check WARNING metrics. " datatype="VARCHAR" size="23" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
</DIIf>
</DIIfStep>
</DIElse>
</DIIfStep>
</DIElse>
</DIIfStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'update JOB_STREAM_STEP_RT&#xA;               set STATUS = {$l_status}, STATE = \'FINISHED\' , END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127), STATUS_INFO = {$l_status_info}, RECO_ACTION = {$l_reco_action}&#xA;               where MD_PROCESS_ID = {$p_process_id}')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="update JOB_STREAM_STEP_RT&#xA;               set STATUS = {$l_status}, STATE = 'FINISHED' , END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127), STATUS_INFO = {$l_status_info}, RECO_ACTION = {$l_reco_action}&#xA;               where MD_PROCESS_ID = {$p_process_id}" datatype="VARCHAR" size="272" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**" datatype="VARCHAR" size="2" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**" datatype="VARCHAR" size="2" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('** The Job {job_name()} is ending')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="** The Job {job_name()} is ending" datatype="VARCHAR" size="33" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**   status: {$l_status}')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**   status: {$l_status}" datatype="VARCHAR" size="24" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**   explanation: {$l_status_info})')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**   explanation: {$l_status_info})" datatype="VARCHAR" size="35" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="********************************" datatype="VARCHAR" size="32" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="********************************" datatype="VARCHAR" size="32" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="ABC_FAILJB_FN" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="# IN EVENT THE JOB FAILED, UPDATE JOB RECORD WITH FAIL STATUS&#xA;&#xA;&#xA;if ($p_process_id is null)&#xA;  begin&#xA; &#x9; ETL_PRINT( 'ENTERED THE JOB CATCH BEFORE THE PROCESS_ID COULD BE SET (debug mode specific error)' );&#xA; &#x9; ETL_PRINT( 'AN ERROR RAISED BEFORE the execution of the job start script (this exception will not be recorded by ABC infrastructure)' );&#xA;  end&#xA;else&#xA;  begin&#xA;&#x9; $l_status_text = replace_substr( $p_status_info, '\'','\'\'');&#xA; &#x9; sql('DW_ABC_DS','update JOB_STREAM_STEP_RT&#xA;                 set STATE = \'FINISHED\', END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127), STATUS = \'ERROR\', STATUS_INFO = {$l_status_text}&#xA;                 where  MD_PROCESS_ID = {$p_process_id} ');&#xA;&#xA;  end&#xA;&#xA;&#xA;ETL_PRINT( '        ** The Job : [job_name()] FAILED' );&#xA;ETL_PRINT( '        **   user: ' || system_user_name() );&#xA;ETL_PRINT( '        **   status info: ' || $p_status_info );&#xA;ETL_PRINT( '        ********************************' );&#xA;ETL_PRINT( '        ********************************' );&#xA;&#xA;return NULL;&#xA;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
<DIAttribute name="Parallelizable" value="no"/>
<DIAttribute name="isScriptValidationFunction" value="no"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$p_process_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="IN" name="$p_status_info" datatype="VARCHAR" size="400" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$l_status_text" datatype="VARCHAR" size="400" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="INT" />
<DISteps>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($p_process_id IS  NULL )" >
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$p_process_id" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('ENTERED THE JOB CATCH BEFORE THE PROCESS_ID COULD BE SET (debug mode specific error)')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="ENTERED THE JOB CATCH BEFORE THE PROCESS_ID COULD BE SET (debug mode specific error)" datatype="VARCHAR" size="84" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('AN ERROR RAISED BEFORE the execution of the job start script (this exception will not be recorded by ABC infrastructure)')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="AN ERROR RAISED BEFORE the execution of the job start script (this exception will not be recorded by ABC infrastructure)" datatype="VARCHAR" size="120" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIAssignmentStep typeId="12" variable="$l_status_text" >
<DIExpression isString="true" expr="replace_substr($p_status_info, '\'', '\'\'')" >
<FUNCTION_CALL name="replace_substr"  type="DI" >
<VARIABLE_REFERENCE name="$p_status_info" />
<CONSTANT value="'" datatype="VARCHAR" size="1" />
<CONSTANT value="''" datatype="VARCHAR" size="2" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'update JOB_STREAM_STEP_RT&#xA;                 set STATE = \'FINISHED\', END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127), STATUS = \'ERROR\', STATUS_INFO = {$l_status_text}&#xA;                 where  MD_PROCESS_ID = {$p_process_id} ')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="update JOB_STREAM_STEP_RT&#xA;                 set STATE = 'FINISHED', END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127), STATUS = 'ERROR', STATUS_INFO = {$l_status_text}&#xA;                 where  MD_PROCESS_ID = {$p_process_id} " datatype="VARCHAR" size="241" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('        ** The Job : [job_name()] FAILED')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="        ** The Job : [job_name()] FAILED" datatype="VARCHAR" size="40" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('        **   user: ' || system_user_name()))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="        **   user: " datatype="VARCHAR" size="19" />
<FUNCTION_CALL name="system_user_name"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('        **   status info: ' || $p_status_info))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="        **   status info: " datatype="VARCHAR" size="26" />
<VARIABLE_REFERENCE name="$p_status_info" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('        ********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('        ********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="ABC_FAILWF_FN" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="# IN EVENT THE WORKFLOW FAILED, UPDATE WORKFLOW RECORD WITH FAIL STATUS&#xA;&#xA;$l_status_text = replace_substr( $p_status_info, '\'','\'\'');&#xA;&#xA;sql('DW_ABC_DS','update JOB_STREAM_STEP_DETAIL_RT&#xA;                 set STATUS = \'ERROR\', STATUS_INFO = {$l_status_text}, END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127)&#xA;                 where  MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} ');&#xA;&#xA;ETL_PRINT( '        ** The workflow: [workflow_name()] FAILED' );&#xA;ETL_PRINT( '        **   user: ' || system_user_name() );&#xA;ETL_PRINT( '        **   status info: ' || $p_status_info );&#xA;ETL_PRINT( '        **   detail name: ' || $p_detailname );&#xA;ETL_PRINT( '        ********************************' );&#xA;ETL_PRINT( '        ********************************' );&#xA;&#xA;return NULL;&#xA;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$p_detailname" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$p_process_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="IN" name="$p_status_info" datatype="VARCHAR" size="400" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$l_status_text" datatype="VARCHAR" size="400" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="INT" />
<DISteps>
<DIAssignmentStep typeId="12" variable="$l_status_text" >
<DIExpression isString="true" expr="replace_substr($p_status_info, '\'', '\'\'')" >
<FUNCTION_CALL name="replace_substr"  type="DI" >
<VARIABLE_REFERENCE name="$p_status_info" />
<CONSTANT value="'" datatype="VARCHAR" size="1" />
<CONSTANT value="''" datatype="VARCHAR" size="2" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'update JOB_STREAM_STEP_DETAIL_RT&#xA;                 set STATUS = \'ERROR\', STATUS_INFO = {$l_status_text}, END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127)&#xA;                 where  MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} ')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="update JOB_STREAM_STEP_DETAIL_RT&#xA;                 set STATUS = 'ERROR', STATUS_INFO = {$l_status_text}, END_TIME = convert(varchar(25),convert(datetime,getdate(),111),127)&#xA;                 where  MD_PROCESS_ID = {$p_process_id} AND DETAIL_NAME = {$p_detailname} " datatype="VARCHAR" size="262" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('        ** The workflow: [workflow_name()] FAILED')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="        ** The workflow: [workflow_name()] FAILED" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('        **   user: ' || system_user_name()))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="        **   user: " datatype="VARCHAR" size="19" />
<FUNCTION_CALL name="system_user_name"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('        **   status info: ' || $p_status_info))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="        **   status info: " datatype="VARCHAR" size="26" />
<VARIABLE_REFERENCE name="$p_status_info" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('        **   detail name: ' || $p_detailname))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="        **   detail name: " datatype="VARCHAR" size="26" />
<VARIABLE_REFERENCE name="$p_detailname" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('        ********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('        ********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="ABC_STARTJB_FN" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="#$l_job_start_date = sysdate( );&#xD;&#xA;$l_job_start_date = sql('DW_ABC_DS','select getdate()');&#xD;&#xA;$l_job_start_date_vchar = sql('DW_ABC_DS','select convert(varchar(25),convert(datetime,{$l_job_start_date},111),127)');&#xD;&#xA;ETL_PRINT('l_job_start_date_vchar = '|| $l_job_start_date_vchar);&#xD;&#xA;#sql('DW_ABC_DS','select convert(datetime,GETDATE()-5,111)');&#xD;&#xA;#;&#xA;# the job may have been called from the DW scheduler as part of a job stream&#xA;# or it may be launched manually &#xA;# if the job is called as part of a job stream&#xA;#   then its row in DW_ABC_DS.STEP_RUNTIME identified by $G_STEP_RT_ID  has already &#xA;#   been created with a WAITING status&#xA;# else&#xA;#   the job has been launched out of a stream context, it will create its own entry &#xA;#   flagged as MANUAL in DW_ABC_DS.STEP_RUNTIME&#xA;       &#xA;if ($p_debug_mode is null or not $p_debug_mode = 1)&#xA;  begin&#xA;    if ($p_process_id is null)&#xA;      begin&#xA;&#x9;    ETL_PRINT( 'ERROR: $G_PROCESS_ID is not set. If you want to run manually the job, you must set $G_DEBUG_MODE=1' );&#xA;        raise_exception('$G_PROCESS_ID is not set. If you want to run manually the job, you must set $G_DEBUG_MODE=1');&#xA;      end&#xA;    # retrieve the batch id from the STEP_RUNTIME table&#xA;    $p_batch_id = sql('DW_ABC_DS',&#xA;      'SELECT MD_BATCH_ID FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}');&#xA;    if ($p_batch_id is null)&#xA;      begin&#xA;&#x9;    ETL_PRINT( 'ERROR: Process ' || $p_process_id || ' not found in STEP_RUNTIME table.' );&#xA;        raise_exception('process '||$p_process_id||' is not found in STEP_RUNTIME table.');&#xA;      end&#xA;  end&#xA;else&#xA;  begin&#xA;    if ($p_process_id is not null)&#xA;      begin&#xA;&#x9;    ETL_PRINT( 'ERROR: abC usage error detected : $G_DEBUG_MODE is set to ' || $p_debug_mode || ' but $G_PROCESS_ID is not null (set to '||$p_process_id||'). In debug mode Process ID will be allocated by the job and cannot be specified');&#xA;        raise_exception('ERROR: abC usage error detected : $G_DEBUG_MODE is set to ' || $p_debug_mode || ' but $G_PROCESS_ID is not null (set to '||$p_process_id||'). in debug mode Process ID will be allocated by the system and cannot be specified');&#xA;      end&#xA;    # create the job level row in DW_ABC_DS.STEP_RUNTIME note that only a basic row without start dates is created &#xA;  &#x9;# this will be done in code shared for scheduled and manual rows&#xA;&#xD;&#xA;#    sql('DW_ABC_DS','insert into JOB_STREAM_STEP_RT (JOB_NAME, START_TIME, STEP_OWNER, STATE) &#xA;#                     VALUES ({job_name()},{$l_job_start_date}, \'MANUAL\', \'STARTING\')');&#xA;&#xD;&#xA;    sql('DW_ABC_DS','insert into JOB_STREAM_STEP_RT (JOB_NAME, START_TIME, STEP_OWNER, STATE) &#xA;                     VALUES ({job_name()},{$l_job_start_date_vchar}, \'MANUAL\', \'STARTING\')');&#xA;  &#x9;# retrieve the row ID affected by the DB, this ID will be used for any future reference to the STEP_RUNTIME table&#xA;# &#x9;$p_process_id = sql('DW_ABC_DS','SELECT MD_PROCESS_ID from JOB_STREAM_STEP_RT where JOB_NAME = {job_name()} AND START_TIME = {$l_job_start_date} AND STEP_OWNER = \'MANUAL\' AND STATE =  \'STARTING\' ');&#xA;#&#x9;ETL_PRINT( 'After manual launch, the assigned Process ID is: ' || $p_process_id );&#xA;&#xD;&#xA; &#x9;$p_process_id = sql('DW_ABC_DS','SELECT MD_PROCESS_ID from JOB_STREAM_STEP_RT where JOB_NAME = {job_name()} AND START_TIME = {$l_job_start_date_vchar} AND STEP_OWNER = \'MANUAL\' AND STATE =  \'STARTING\' ');&#xA;&#x9;ETL_PRINT( 'After manual launch, the assigned Process ID is: ' || $p_process_id );&#xA;&#x9;# No new batch is created in debug mode, but set 0 to batch-id variable to have a not null value&#xA;&#x9;$p_batch_id = 0;&#xA;  end&#xA;&#xA;&#xA;ETL_PRINT ( 'Process ' || $p_process_id || ' retrieved $p_batch_id = {$p_batch_id}' );&#xA;$l_state = sql('DW_ABC_DS',&#xA;      'SELECT STATE FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}');&#xA;$l_job_name = sql('DW_ABC_DS',&#xA;      'SELECT JOB_NAME FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}');&#xA;&#xA;if ($l_state != 'STARTING' )&#xA;begin&#xA;    sql('DW_ABC_DS','update JOB_STREAM_STEP_RT set STATUS_INFO = \'Tried to run job, but it is not in a runnable state.\' &#xA;         where MD_PROCESS_ID = {$p_process_id}');&#xA;    raise_exception('ERROR: This job is not in a runnable state. This may come from Web Service timeout, the job will not execute and a new one will be trigered by ABC (if not already done)');&#xA;end&#xA;&#xA;if ($l_job_name != job_name() )&#xA;begin&#xA;   # sql('DW_ABC_DS','update JOB_STREAM_STEP_RT set STATUS_INFO = \'This job, {job_name()}, does not match the JOB_NAME of the step you are trying to run ($l_job_name).\' &#xA;   #      where MD_PROCESS_ID = {$p_process_id}');&#xA;    raise_exception('ERROR: This job, {job_name()}, does not match the JOB_NAME of the step you are trying to run (' || $l_job_name || ').');&#xA;end&#xA;&#xA;# now flag the job as running&#xD;&#xA;#sql('DW_ABC_DS','update JOB_STREAM_STEP_RT set STATE = \'RUNNING\',&#xA;#JOB_NAME = {job_name()}, START_TIME = convert(datetime,{$l_job_start_date},111)&#xA;#where MD_PROCESS_ID = {$p_process_id}');&#xA;sql('DW_ABC_DS','update JOB_STREAM_STEP_RT set STATE = \'RUNNING\',&#xA;JOB_NAME = {job_name()}, START_TIME = {$l_job_start_date_vchar}&#xA;where MD_PROCESS_ID = {$p_process_id}');&#xA;&#xA;set_env( 'ETL_DEBUG_MODE', $p_debug_mode );&#xA;set_env( 'ETL_BATCH_ID', $p_batch_id);&#xA;set_env( 'ETL_PROCESS_ID', $p_process_id );&#xA;if ( is_set_env( 'ETL_TRACE_LEVEL' ) != 1 )&#xA;begin&#xA;&#x9;set_env( 'ETL_TRACE_LEVEL', 'ALL' );&#xA;end&#xA;&#xA;ETL_PRINT( '********************************' );&#xA;ETL_PRINT( '********************************' );&#xA;ETL_PRINT( '** The Job {job_name()} is starting' || ifthenelse((get_env('ETL_DEBUG_MODE') = '1'), ' in Debug mode', '') || '.');&#xA;ETL_PRINT( '**' );&#xA;ETL_PRINT( '**' );&#xA;&#xA;return (5);&#xA;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
</DIProperties>
<DIParameters><DIElement paramType="IN_OUT" name="$p_process_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="IN" name="$p_debug_mode" datatype="INT" >
</DIElement>
<DIElement paramType="OUT" name="$p_batch_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$l_previous_process_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_sqltext" datatype="VARCHAR" size="80" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_job_start_date" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_state" datatype="VARCHAR" size="30" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_job_name" datatype="VARCHAR" size="60" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_job_start_date_vchar" datatype="VARCHAR" size="25" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="DATETIME" />
<DISteps>
<DIAssignmentStep typeId="12" variable="$l_job_start_date" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'select getdate()')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="select getdate()" datatype="VARCHAR" size="16" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$l_job_start_date_vchar" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'select convert(varchar(25),convert(datetime,{$l_job_start_date},111),127)')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="select convert(varchar(25),convert(datetime,{$l_job_start_date},111),127)" datatype="VARCHAR" size="73" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('l_job_start_date_vchar = ' || $l_job_start_date_vchar))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="l_job_start_date_vchar = " datatype="VARCHAR" size="25" />
<VARIABLE_REFERENCE name="$l_job_start_date_vchar" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(($p_debug_mode IS  NULL ) OR&#xA;   ( not ($p_debug_mode = 1)))" >
<LOGICAL_OP op="OR">
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$p_debug_mode" />
</LOGICAL_OP>
<LOGICAL_OP op="NOT">
<LOGICAL_OP op="EQ">
<VARIABLE_REFERENCE name="$p_debug_mode" />
<CONSTANT value="1" datatype="INT" />
</LOGICAL_OP>
</LOGICAL_OP>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($p_process_id IS  NULL )" >
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$p_process_id" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('ERROR: $G_PROCESS_ID is not set. If you want to run manually the job, you must set $G_DEBUG_MODE=1')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="ERROR: $G_PROCESS_ID is not set. If you want to run manually the job, you must set $G_DEBUG_MODE=1" datatype="VARCHAR" size="98" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('$G_PROCESS_ID is not set. If you want to run manually the job, you must set $G_DEBUG_MODE=1')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="$G_PROCESS_ID is not set. If you want to run manually the job, you must set $G_DEBUG_MODE=1" datatype="VARCHAR" size="91" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$p_batch_id" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'SELECT MD_BATCH_ID FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="SELECT MD_BATCH_ID FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}" datatype="VARCHAR" size="80" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($p_batch_id IS  NULL )" >
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$p_batch_id" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('ERROR: Process ' || $p_process_id) || ' not found in STEP_RUNTIME table.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="ERROR: Process " datatype="VARCHAR" size="15" />
<VARIABLE_REFERENCE name="$p_process_id" />
</CONCAT>
<CONSTANT value=" not found in STEP_RUNTIME table." datatype="VARCHAR" size="33" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception((('process ' || $p_process_id) || ' is not found in STEP_RUNTIME table.'))" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="process " datatype="VARCHAR" size="8" />
<VARIABLE_REFERENCE name="$p_process_id" />
</CONCAT>
<CONSTANT value=" is not found in STEP_RUNTIME table." datatype="VARCHAR" size="36" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
</DIIfStep>
</DIIf>
<DIElse>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($p_process_id IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$p_process_id" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((((('ERROR: abC usage error detected : $G_DEBUG_MODE is set to ' || $p_debug_mode) || ' but $G_PROCESS_ID is not null (set to ') || $p_process_id) || '). In debug mode Process ID will be allocated by the job and cannot be specified'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="ERROR: abC usage error detected : $G_DEBUG_MODE is set to " datatype="VARCHAR" size="58" />
<VARIABLE_REFERENCE name="$p_debug_mode" />
</CONCAT>
<CONSTANT value=" but $G_PROCESS_ID is not null (set to " datatype="VARCHAR" size="39" />
</CONCAT>
<VARIABLE_REFERENCE name="$p_process_id" />
</CONCAT>
<CONSTANT value="). In debug mode Process ID will be allocated by the job and cannot be specified" datatype="VARCHAR" size="80" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception((((('ERROR: abC usage error detected : $G_DEBUG_MODE is set to ' || $p_debug_mode) || ' but $G_PROCESS_ID is not null (set to ') || $p_process_id) || '). in debug mode Process ID will be allocated by the system and cannot be specified'))" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="ERROR: abC usage error detected : $G_DEBUG_MODE is set to " datatype="VARCHAR" size="58" />
<VARIABLE_REFERENCE name="$p_debug_mode" />
</CONCAT>
<CONSTANT value=" but $G_PROCESS_ID is not null (set to " datatype="VARCHAR" size="39" />
</CONCAT>
<VARIABLE_REFERENCE name="$p_process_id" />
</CONCAT>
<CONSTANT value="). in debug mode Process ID will be allocated by the system and cannot be specified" datatype="VARCHAR" size="83" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
</DIIfStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'insert into JOB_STREAM_STEP_RT (JOB_NAME, START_TIME, STEP_OWNER, STATE) &#xA;                     VALUES ({job_name()},{$l_job_start_date_vchar}, \'MANUAL\', \'STARTING\')')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="insert into JOB_STREAM_STEP_RT (JOB_NAME, START_TIME, STEP_OWNER, STATE) &#xA;                     VALUES ({job_name()},{$l_job_start_date_vchar}, 'MANUAL', 'STARTING')" datatype="VARCHAR" size="164" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$p_process_id" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'SELECT MD_PROCESS_ID from JOB_STREAM_STEP_RT where JOB_NAME = {job_name()} AND START_TIME = {$l_job_start_date_vchar} AND STEP_OWNER = \'MANUAL\' AND STATE =  \'STARTING\' ')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="SELECT MD_PROCESS_ID from JOB_STREAM_STEP_RT where JOB_NAME = {job_name()} AND START_TIME = {$l_job_start_date_vchar} AND STEP_OWNER = 'MANUAL' AND STATE =  'STARTING' " datatype="VARCHAR" size="168" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('After manual launch, the assigned Process ID is: ' || $p_process_id))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="After manual launch, the assigned Process ID is: " datatype="VARCHAR" size="49" />
<VARIABLE_REFERENCE name="$p_process_id" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$p_batch_id" >
<DIExpression isString="true" expr="0" >
<CONSTANT value="0" datatype="INT" />
</DIExpression>
</DIAssignmentStep>
</DIElse>
</DIIfStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('Process ' || $p_process_id) || ' retrieved $p_batch_id = {$p_batch_id}'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="Process " datatype="VARCHAR" size="8" />
<VARIABLE_REFERENCE name="$p_process_id" />
</CONCAT>
<CONSTANT value=" retrieved $p_batch_id = {$p_batch_id}" datatype="VARCHAR" size="38" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$l_state" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'SELECT STATE FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="SELECT STATE FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}" datatype="VARCHAR" size="74" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$l_job_name" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'SELECT JOB_NAME FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="SELECT JOB_NAME FROM JOB_STREAM_STEP_RT where MD_PROCESS_ID = {$p_process_id}" datatype="VARCHAR" size="77" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($l_state != 'STARTING')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$l_state" />
<CONSTANT value="STARTING" datatype="VARCHAR" size="8" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'update JOB_STREAM_STEP_RT set STATUS_INFO = \'Tried to run job, but it is not in a runnable state.\' &#xA;         where MD_PROCESS_ID = {$p_process_id}')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="update JOB_STREAM_STEP_RT set STATUS_INFO = 'Tried to run job, but it is not in a runnable state.' &#xA;         where MD_PROCESS_ID = {$p_process_id}" datatype="VARCHAR" size="146" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR: This job is not in a runnable state. This may come from Web Service timeout, the job will not execute and a new one will be trigered by ABC (if not already done)')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR: This job is not in a runnable state. This may come from Web Service timeout, the job will not execute and a new one will be trigered by ABC (if not already done)" datatype="VARCHAR" size="168" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
</DIIfStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($l_job_name != job_name())" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$l_job_name" />
<FUNCTION_CALL name="job_name"  type="DI" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception((('ERROR: This job, {job_name()}, does not match the JOB_NAME of the step you are trying to run (' || $l_job_name) || ').'))" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="ERROR: This job, {job_name()}, does not match the JOB_NAME of the step you are trying to run (" datatype="VARCHAR" size="94" />
<VARIABLE_REFERENCE name="$l_job_name" />
</CONCAT>
<CONSTANT value=")." datatype="VARCHAR" size="2" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
</DIIfStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'update JOB_STREAM_STEP_RT set STATE = \'RUNNING\',&#xA;JOB_NAME = {job_name()}, START_TIME = {$l_job_start_date_vchar}&#xA;where MD_PROCESS_ID = {$p_process_id}')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="update JOB_STREAM_STEP_RT set STATE = 'RUNNING',&#xA;JOB_NAME = {job_name()}, START_TIME = {$l_job_start_date_vchar}&#xA;where MD_PROCESS_ID = {$p_process_id}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="set_env('ETL_DEBUG_MODE', $p_debug_mode)" >
<FUNCTION_CALL name="set_env"  type="DI" >
<CONSTANT value="ETL_DEBUG_MODE" datatype="VARCHAR" size="14" />
<VARIABLE_REFERENCE name="$p_debug_mode" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="set_env('ETL_BATCH_ID', $p_batch_id)" >
<FUNCTION_CALL name="set_env"  type="DI" >
<CONSTANT value="ETL_BATCH_ID" datatype="VARCHAR" size="12" />
<VARIABLE_REFERENCE name="$p_batch_id" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="set_env('ETL_PROCESS_ID', $p_process_id)" >
<FUNCTION_CALL name="set_env"  type="DI" >
<CONSTANT value="ETL_PROCESS_ID" datatype="VARCHAR" size="14" />
<VARIABLE_REFERENCE name="$p_process_id" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(is_set_env('ETL_TRACE_LEVEL') != 1)" >
<LOGICAL_OP op="NE">
<FUNCTION_CALL name="is_set_env"  type="DI" >
<CONSTANT value="ETL_TRACE_LEVEL" datatype="VARCHAR" size="15" />
</FUNCTION_CALL>
<CONSTANT value="1" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="set_env('ETL_TRACE_LEVEL', 'ALL')" >
<FUNCTION_CALL name="set_env"  type="DI" >
<CONSTANT value="ETL_TRACE_LEVEL" datatype="VARCHAR" size="15" />
<CONSTANT value="ALL" datatype="VARCHAR" size="3" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
</DIIfStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="********************************" datatype="VARCHAR" size="32" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="********************************" datatype="VARCHAR" size="32" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('** The Job {job_name()} is starting' || ifthenelse((get_env('ETL_DEBUG_MODE') = '1'), ' in Debug mode', '')) || '.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="** The Job {job_name()} is starting" datatype="VARCHAR" size="35" />
<FUNCTION_CALL name="ifthenelse"  type="DI" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="get_env"  type="DI" >
<CONSTANT value="ETL_DEBUG_MODE" datatype="VARCHAR" size="14" />
</FUNCTION_CALL>
<CONSTANT value="1" datatype="VARCHAR" size="1" />
</LOGICAL_OP>
<CONSTANT value=" in Debug mode" datatype="VARCHAR" size="14" />
<CONSTANT value="" datatype="VARCHAR" size="0" />
</FUNCTION_CALL>
</CONCAT>
<CONSTANT value="." datatype="VARCHAR" size="1" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**" datatype="VARCHAR" size="2" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('**')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="**" datatype="VARCHAR" size="2" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr="5" >
<CONSTANT value="5" datatype="INT" />
</DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="ABC_STARTWF_FN" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="ETL_PRINT( '        ********************************' );&#xA;ETL_PRINT( '        ********************************' );&#xA;ETL_PRINT( '        ** The workflow [workflow_name()] is starting' );&#xA;ETL_PRINT( '        **   user: ' || system_user_name() );&#xA;ETL_PRINT( '        **   detail name: ' || $p_detailname );&#xA;&#xA;# DELETE EXISTING WORKFLOW RECORD&#xA;#sql('DW_ABC_DS','delete from RDS_DBA.WFEXECUTION_DW&#xA;#where APPNAME = {$p_appname} AND JOBNAME = {job_name()} AND WFNAME = {workflow_name()}&#xA;#AND TARGET_TABLE = {$l_single_tablename}');&#xA;&#xA;# GET MAX_ID FROM THE WFEXECUTION_DW TABLE&#xA;#$job_ maxkey = sql('DW_ABC_DS', 'SELECT MAX(JOB_ID) FROM RDS_DBA.ETLSYNC_DW');&#xA;#$maxkey = $maxkey + 1;&#xA;&#xA;# INSERT WORKFLOW RECORD&#x9;&#x9;&#xD;&#xA;&#xA;#$l_stepdetail_id = sql('DW_ABC_DS','insert into JOB_STREAM_STEP_DETAIL_RT &#xA;#                (MD_PROCESS_ID, DETAIL_NAME, STATUS, START_TIME)  &#xA;#                VALUES ({$p_process_id}, {$p_detailname}, \'RUNNING\', {sysdate()});&#xA;#&#x9;&#x9;&#x9;&#x9;SELECT SCOPE_IDENTITY() AS NewStepDetailID');&#xA;$l_stepdetail_id = sql('DW_ABC_DS','insert into JOB_STREAM_STEP_DETAIL_RT &#xA;                (MD_PROCESS_ID, DETAIL_NAME, STATUS, START_TIME)  &#xA;                VALUES ({$p_process_id}, {$p_detailname}, \'RUNNING\', convert(varchar(25),convert(datetime,getdate(),111),127));&#xA;&#x9;&#x9;&#x9;&#x9;SELECT SCOPE_IDENTITY() AS NewStepDetailID');&#x9;&#xA;&#xA;set_env(workflow_name(), $l_stepdetail_id);&#xA;&#xA;# print('single_tablename = ' || $l_single_tablename);&#x9;   &#x9;&#xA;&#xA;return null;&#xA;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$p_detailname" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$p_process_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$l_stepdetail_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="INT" />
<DISteps>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('        ********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('        ********************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="        ********************************" datatype="VARCHAR" size="40" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('        ** The workflow [workflow_name()] is starting')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="        ** The workflow [workflow_name()] is starting" datatype="VARCHAR" size="53" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('        **   user: ' || system_user_name()))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="        **   user: " datatype="VARCHAR" size="19" />
<FUNCTION_CALL name="system_user_name"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('        **   detail name: ' || $p_detailname))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="        **   detail name: " datatype="VARCHAR" size="26" />
<VARIABLE_REFERENCE name="$p_detailname" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$l_stepdetail_id" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'insert into JOB_STREAM_STEP_DETAIL_RT &#xA;                (MD_PROCESS_ID, DETAIL_NAME, STATUS, START_TIME)  &#xA;                VALUES ({$p_process_id}, {$p_detailname}, \'RUNNING\', convert(varchar(25),convert(datetime,getdate(),111),127));&#xA;&#x9;&#x9;&#x9;&#x9;SELECT SCOPE_IDENTITY() AS NewStepDetailID')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="insert into JOB_STREAM_STEP_DETAIL_RT &#xA;                (MD_PROCESS_ID, DETAIL_NAME, STATUS, START_TIME)  &#xA;                VALUES ({$p_process_id}, {$p_detailname}, 'RUNNING', convert(varchar(25),convert(datetime,getdate(),111),127));&#xA;&#x9;&#x9;&#x9;&#x9;SELECT SCOPE_IDENTITY() AS NewStepDetailID" datatype="VARCHAR" size="280" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="set_env(workflow_name(), $l_stepdetail_id)" >
<FUNCTION_CALL name="set_env"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$l_stepdetail_id" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="CDC_GET_DELTA_START_DATE_FN" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="ETL_PRINT('entered CDC_CALC_EXTRACT_START_DATE');&#xA;ETL_PRINT('$p_extraction_identifier = {$p_extraction_identifier}');&#xA;&#xA;$l_tsnp_table_name = $p_product_name||'_'||$p_extraction_identifier || '_TSNP';&#xD;&#xA;&#xA;&#xD;&#xA;&#x9;$p_extract_start_date = sql('SRCSTAGING_DS', 'SELECT max('||$p_column_name||') FROM '|| $l_tsnp_table_name||' where MD_CP_ID='||$p_contentpack_id); &#xD;&#xA;&#x9;######$p_extract_start_date = sql('SRCSTAGING_DS', 'SELECT max('||$p_column_name||') FROM '|| $l_tsnp_table_name ||' where MD_CP_ID = '||$p_contentpack_id ); &#xD;&#xA;&#x9;ETL_PRINT('SELECT max('||$p_column_name||') FROM '|| $l_tsnp_table_name||' where MD_CP_ID='||$p_contentpack_id);&#xA;&#xA;if ($p_extract_start_date is not null)&#xA;  begin&#xA;    ETL_PRINT('Delta load will be performed for extraction {$p_extraction_identifier} for SRC_LASTMODATE &gt;= ' || to_char($p_extract_start_date,'DD/MM/YYYY HH:mi:ss.ff'));&#xA;  end &#xA;else &#xA;  begin&#xA;    ETL_PRINT('Initial load will be performed for extraction {$p_extraction_identifier}');&#xA;    $p_extract_start_date = add_months( sysdate(), ($p_initload_m * (-1)));&#xD;&#xA;&#x9;$l_offset_in_min = CDC_GET_MAX_DST($p_extract_start_date,$p_contentpack_id);&#xD;&#xA;&#x9;$p_extract_start_date = $p_extract_start_date -num_to_interval($l_offset_in_min, 'M'); &#xD;&#xA;&#x9;ETL_PRINT('Initial load Start Date is '||$p_extract_start_date);&#xA;  end&#xA;&#xA;return null;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
</DIProperties>
<DIParameters><DIElement paramType="IN_OUT" name="$p_extract_start_date" datatype="DATETIME" >
</DIElement>
<DIElement paramType="IN" name="$p_contentpack_id" datatype="INT" >
</DIElement>
<DIElement paramType="IN" name="$p_product_name" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$p_extraction_identifier" datatype="VARCHAR" size="30" >
</DIElement>
<DIElement paramType="IN" name="$p_column_name" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$p_initload_m" datatype="INT" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$l_tsnp_table_name" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_offset_in_min" datatype="INT" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="INT" />
<DISteps>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('entered CDC_CALC_EXTRACT_START_DATE')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="entered CDC_CALC_EXTRACT_START_DATE" datatype="VARCHAR" size="35" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('$p_extraction_identifier = {$p_extraction_identifier}')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="$p_extraction_identifier = {$p_extraction_identifier}" datatype="VARCHAR" size="53" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$l_tsnp_table_name" >
<DIExpression isString="true" expr="((($p_product_name || '_') || $p_extraction_identifier) || '_TSNP')" >
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$p_product_name" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$p_extraction_identifier" />
</CONCAT>
<CONSTANT value="_TSNP" datatype="VARCHAR" size="5" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$p_extract_start_date" >
<DIExpression isString="true" expr="sql('SRCSTAGING_DS', ((((('SELECT max(' || $p_column_name) || ') FROM ') || $l_tsnp_table_name) || ' where MD_CP_ID=') || $p_contentpack_id))" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="SRCSTAGING_DS" datatype="VARCHAR" size="13" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="SELECT max(" datatype="VARCHAR" size="11" />
<VARIABLE_REFERENCE name="$p_column_name" />
</CONCAT>
<CONSTANT value=") FROM " datatype="VARCHAR" size="7" />
</CONCAT>
<VARIABLE_REFERENCE name="$l_tsnp_table_name" />
</CONCAT>
<CONSTANT value=" where MD_CP_ID=" datatype="VARCHAR" size="16" />
</CONCAT>
<VARIABLE_REFERENCE name="$p_contentpack_id" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(((((('SELECT max(' || $p_column_name) || ') FROM ') || $l_tsnp_table_name) || ' where MD_CP_ID=') || $p_contentpack_id))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="SELECT max(" datatype="VARCHAR" size="11" />
<VARIABLE_REFERENCE name="$p_column_name" />
</CONCAT>
<CONSTANT value=") FROM " datatype="VARCHAR" size="7" />
</CONCAT>
<VARIABLE_REFERENCE name="$l_tsnp_table_name" />
</CONCAT>
<CONSTANT value=" where MD_CP_ID=" datatype="VARCHAR" size="16" />
</CONCAT>
<VARIABLE_REFERENCE name="$p_contentpack_id" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($p_extract_start_date IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$p_extract_start_date" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('Delta load will be performed for extraction {$p_extraction_identifier} for SRC_LASTMODATE &gt;= ' || to_char($p_extract_start_date, 'DD/MM/YYYY HH:mi:ss.ff')))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="Delta load will be performed for extraction {$p_extraction_identifier} for SRC_LASTMODATE &gt;= " datatype="VARCHAR" size="93" />
<FUNCTION_CALL name="to_char"  type="DI" >
<VARIABLE_REFERENCE name="$p_extract_start_date" />
<CONSTANT value="DD/MM/YYYY HH:mi:ss.ff" datatype="VARCHAR" size="22" />
</FUNCTION_CALL>
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('Initial load will be performed for extraction {$p_extraction_identifier}')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="Initial load will be performed for extraction {$p_extraction_identifier}" datatype="VARCHAR" size="72" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$p_extract_start_date" >
<DIExpression isString="true" expr="add_months(sysdate(), ($p_initload_m * -1))" >
<FUNCTION_CALL name="add_months"  type="DI" >
<FUNCTION_CALL name="sysdate"  type="DI" />
<MULTIPLY>
<VARIABLE_REFERENCE name="$p_initload_m" />
<CONSTANT value="-1" datatype="INT" />
</MULTIPLY>
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$l_offset_in_min" >
<DIExpression isString="true" expr="cdc_get_max_dst($p_extract_start_date, $p_contentpack_id)" >
<FUNCTION_CALL name="cdc_get_max_dst"  type="DI" >
<VARIABLE_REFERENCE name="$p_extract_start_date" />
<VARIABLE_REFERENCE name="$p_contentpack_id" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$p_extract_start_date" >
<DIExpression isString="true" expr="($p_extract_start_date - num_to_interval($l_offset_in_min, 'M'))" >
<SUBTRACT>
<VARIABLE_REFERENCE name="$p_extract_start_date" />
<FUNCTION_CALL name="num_to_interval"  type="DI" >
<VARIABLE_REFERENCE name="$l_offset_in_min" />
<CONSTANT value="M" datatype="VARCHAR" size="1" />
</FUNCTION_CALL>
</SUBTRACT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('Initial load Start Date is ' || $p_extract_start_date))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="Initial load Start Date is " datatype="VARCHAR" size="27" />
<VARIABLE_REFERENCE name="$p_extract_start_date" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="CDC_GET_MAX_DST" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="&#xD;&#xA;# needs to be optimized to load one 'useless' additional hour only when a DST change occurs in the period covered by delta load&#xD;&#xA;# between P_LOC_DATE and now + 24 hours (24 hours are added to prevent wholes when the DB system time differs from the DI system timezone)&#xD;&#xA;      $L_MAX_DST  = sql('DW_METADATA_DS','SELECT MAX(DST_VALUE)&#x9;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#x9;from dwmetadata.TIMEZONE_INFO &#xD;&#xA;&#x9;&#x9;&#x9;where TIMEZONE_ID = (SELECT DISTINCT TimeZone FROM dwmetadata.DataSourceConnection WHERE  CP_ID={$p_content_pack_id}) &#xD;&#xA;&#x9;&#x9;&#x9; ');&#xD;&#xA;&#xD;&#xA;&#x9;if ($L_MAX_DST is null)&#xD;&#xA;  &#x9;begin&#xD;&#xA;&#x9;&#x9;$L_MAX_DST = 0;&#xD;&#xA;&#x9;end&#x9;   &#x9;&#x9; &#x9;&#xD;&#xA;&#xD;&#xA;ETL_PRINT('CDC_GET_MAX_DST: INPUT ' || $P_LOC_DATE || ' ('||$p_content_pack_id||')  Maximum DST value is: ' || $L_MAX_DST || ' minutes '   );&#xD;&#xA;&#xD;&#xA;return $L_MAX_DST;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$P_LOC_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="IN" name="$p_content_pack_id" datatype="INT" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$L_UTC_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_OFFSET_IN_MINUTES" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_TZ_ID" datatype="VARCHAR" size="255" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DATE_YEAR" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INVALID_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_MAX_DST" datatype="INT" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="INT" />
<DISteps>
<DIAssignmentStep typeId="12" variable="$L_MAX_DST" >
<DIExpression isString="true" expr="sql('DW_METADATA_DS', 'SELECT MAX(DST_VALUE)&#x9;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#x9;from dwmetadata.TIMEZONE_INFO &#xD;&#xA;&#x9;&#x9;&#x9;where TIMEZONE_ID = (SELECT DISTINCT TimeZone FROM dwmetadata.DataSourceConnection WHERE  CP_ID={$p_content_pack_id}) &#xD;&#xA;&#x9;&#x9;&#x9; ')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_METADATA_DS" datatype="VARCHAR" size="14" />
<CONSTANT value="SELECT MAX(DST_VALUE)&#x9;&#x9;&#x9;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#x9;from dwmetadata.TIMEZONE_INFO &#xD;&#xA;&#x9;&#x9;&#x9;where TIMEZONE_ID = (SELECT DISTINCT TimeZone FROM dwmetadata.DataSourceConnection WHERE  CP_ID={$p_content_pack_id}) &#xD;&#xA;&#x9;&#x9;&#x9; " datatype="VARCHAR" size="190" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_MAX_DST IS  NULL )" >
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$L_MAX_DST" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_MAX_DST" >
<DIExpression isString="true" expr="0" >
<CONSTANT value="0" datatype="INT" />
</DIExpression>
</DIAssignmentStep>
</DIIf>
</DIIfStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((((((('CDC_GET_MAX_DST: INPUT ' || $P_LOC_DATE) || ' (') || $p_content_pack_id) || ')  Maximum DST value is: ') || $L_MAX_DST) || ' minutes '))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="CDC_GET_MAX_DST: INPUT " datatype="VARCHAR" size="23" />
<VARIABLE_REFERENCE name="$P_LOC_DATE" />
</CONCAT>
<CONSTANT value=" (" datatype="VARCHAR" size="2" />
</CONCAT>
<VARIABLE_REFERENCE name="$p_content_pack_id" />
</CONCAT>
<CONSTANT value=")  Maximum DST value is: " datatype="VARCHAR" size="25" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_MAX_DST" />
</CONCAT>
<CONSTANT value=" minutes " datatype="VARCHAR" size="9" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr="$L_MAX_DST" >
<VARIABLE_REFERENCE name="$L_MAX_DST" />
</DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="ETL_PRINT" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="# 1/2 Retrieve contextual information from the environment&#xA;if ( is_set_env( 'ETL_BATCH_ID' ) = 1 )&#xA;begin&#xA;&#x9;$l_batch_id = get_env( 'ETL_BATCH_ID' );&#xA;end&#xA;else&#xA;begin&#xA;&#x9;$l_batch_id = '-';&#xA;end&#xA;&#xA;if ( is_set_env( 'ETL_PROCESS_ID' ) = 1 )&#xA;begin&#xA;&#x9;$l_process_id = get_env( 'ETL_PROCESS_ID' );&#x9;&#xA;end&#xA;else&#xA;begin&#xA;&#x9;$l_process_id = '-';&#x9;&#xA;end&#xA;&#xA;# 2/2 Really print&#xA;if ( get_env('ETL_TRACE_LEVEL') = 'ALL' )&#xA;begin&#xA;&#x9;if ( is_set_env( workflow_name() ) = 1 )&#xA;&#x9;begin&#xA;&#x9;&#x9;$l_stepdetail_id = get_env( workflow_name() );&#xA;&#x9;&#x9;print( '\[Batch:' || $l_batch_id || '\] \[Proc:' || $l_process_id || '\] \[Detail:' || $l_stepdetail_id || '\] ' || $p_MESSAGE );&#xA;&#x9;end&#xA;&#x9;else&#xA;&#x9;begin&#xA;    &#x9;print( '\[Batch:' || $l_batch_id || '\] \[Proc:' || $l_process_id || '\] ' || $p_MESSAGE );&#xA;&#x9;end&#xA;end&#xA;&#xA;return null;&#xA;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
<DIAttribute name="Description" value="This function is internal and should NOT be used by application developers.&#xA;&#xA;This function prints the parameter message to the logs with contextual information (batch id, process id) as set by the ABC_STARTJB_FN function.&#xA;&#xA;This trace file is currently the standard Data Services trace file. for instance: C:\Program Files\Business Objects\BusinessObjects Data Services\log\tracelog.txt"/>
<DIAttribute name="Parallelizable" value="no"/>
<DIAttribute name="isScriptValidationFunction" value="no"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$p_MESSAGE" datatype="VARCHAR" size="256" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$l_batch_id" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_process_id" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$l_stepdetail_id" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="INT" />
<DISteps>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(is_set_env('ETL_BATCH_ID') = 1)" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="is_set_env"  type="DI" >
<CONSTANT value="ETL_BATCH_ID" datatype="VARCHAR" size="12" />
</FUNCTION_CALL>
<CONSTANT value="1" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$l_batch_id" >
<DIExpression isString="true" expr="get_env('ETL_BATCH_ID')" >
<FUNCTION_CALL name="get_env"  type="DI" >
<CONSTANT value="ETL_BATCH_ID" datatype="VARCHAR" size="12" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
<DIAssignmentStep typeId="12" variable="$l_batch_id" >
<DIExpression isString="true" expr="'-'" >
<CONSTANT value="-" datatype="VARCHAR" size="1" />
</DIExpression>
</DIAssignmentStep>
</DIElse>
</DIIfStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(is_set_env('ETL_PROCESS_ID') = 1)" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="is_set_env"  type="DI" >
<CONSTANT value="ETL_PROCESS_ID" datatype="VARCHAR" size="14" />
</FUNCTION_CALL>
<CONSTANT value="1" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$l_process_id" >
<DIExpression isString="true" expr="get_env('ETL_PROCESS_ID')" >
<FUNCTION_CALL name="get_env"  type="DI" >
<CONSTANT value="ETL_PROCESS_ID" datatype="VARCHAR" size="14" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
<DIAssignmentStep typeId="12" variable="$l_process_id" >
<DIExpression isString="true" expr="'-'" >
<CONSTANT value="-" datatype="VARCHAR" size="1" />
</DIExpression>
</DIAssignmentStep>
</DIElse>
</DIIfStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(get_env('ETL_TRACE_LEVEL') = 'ALL')" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="get_env"  type="DI" >
<CONSTANT value="ETL_TRACE_LEVEL" datatype="VARCHAR" size="15" />
</FUNCTION_CALL>
<CONSTANT value="ALL" datatype="VARCHAR" size="3" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(is_set_env(workflow_name()) = 1)" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="is_set_env"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
</FUNCTION_CALL>
<CONSTANT value="1" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$l_stepdetail_id" >
<DIExpression isString="true" expr="get_env(workflow_name())" >
<FUNCTION_CALL name="get_env"  type="DI" >
<FUNCTION_CALL name="workflow_name"  type="DI" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print(((((((('\\[Batch:' || $l_batch_id) || '\\] \\[Proc:') || $l_process_id) || '\\] \\[Detail:') || $l_stepdetail_id) || '\\] ') || $p_MESSAGE))" >
<FUNCTION_CALL name="print"  type="DI" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="\[Batch:" datatype="VARCHAR" size="8" />
<VARIABLE_REFERENCE name="$l_batch_id" />
</CONCAT>
<CONSTANT value="\] \[Proc:" datatype="VARCHAR" size="10" />
</CONCAT>
<VARIABLE_REFERENCE name="$l_process_id" />
</CONCAT>
<CONSTANT value="\] \[Detail:" datatype="VARCHAR" size="12" />
</CONCAT>
<VARIABLE_REFERENCE name="$l_stepdetail_id" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<VARIABLE_REFERENCE name="$p_MESSAGE" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print(((((('\\[Batch:' || $l_batch_id) || '\\] \\[Proc:') || $l_process_id) || '\\] ') || $p_MESSAGE))" >
<FUNCTION_CALL name="print"  type="DI" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="\[Batch:" datatype="VARCHAR" size="8" />
<VARIABLE_REFERENCE name="$l_batch_id" />
</CONCAT>
<CONSTANT value="\] \[Proc:" datatype="VARCHAR" size="10" />
</CONCAT>
<VARIABLE_REFERENCE name="$l_process_id" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<VARIABLE_REFERENCE name="$p_MESSAGE" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="FBI_GET_ENTITY_COUNT" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="#this function get count of entities per process_id &#xD;&#xA;# if flag = 0  &gt;&gt; count all entities per process&#xD;&#xA;#    flag = 1  &gt;&gt; count all finished process per process (all finished statuses)&#xD;&#xA;#    flag = -1 &gt;&gt; count all entities that finished with error status&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# get entity count &#xD;&#xA;if ($P_FLAG=0) &#xD;&#xA; begin&#xD;&#xA;    # count all entities per process&#xA;&#x9;$L_ENTITY_COUNT = sql('DW_ABC_DS','select COUNT(*) from dwabc.JOB_STREAM_STEP_DETAIL_RT where md_process_id = { $P_PROCESS_ID  } ');   &#xA; end&#xD;&#xA;else &#xD;&#xA; begin&#xA;&#x9;if ($P_FLAG=1) &#xD;&#xA; &#x9; begin&#xD;&#xA;     &#x9;# count all finished process per process (all finished statuses)&#xA;&#x9;&#x9;$L_ENTITY_COUNT = sql('DW_ABC_DS','select COUNT(*) from dwabc.JOB_STREAM_STEP_DETAIL_RT where md_process_id = { $P_PROCESS_ID }   and STATUS in (\'SUCCESS\',\'ERROR\',\'WARNING\' ) ');&#xA; &#x9; end&#xD;&#xA;    else &#xD;&#xA;&#x9; begin&#xD;&#xA;&#x9; &#x9;if ($P_FLAG=-1) &#xD;&#xA; &#x9; &#x9; begin&#xD;&#xA;     &#x9;&#x9;# count all entities that finished with error status&#xA;&#x9;&#x9;&#x9;$L_ENTITY_COUNT = sql('DW_ABC_DS','select COUNT(*) from dwabc.JOB_STREAM_STEP_DETAIL_RT where md_process_id = { $P_PROCESS_ID }   and STATUS = \'ERROR\' ');&#xA; &#x9;     end  &#xA; &#x9; end&#xD;&#xA; end&#xD;&#xA; # return value&#xD;&#xA;return  $L_ENTITY_COUNT;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
<DIAttribute name="Description" value="this function get count of entities per process_id or finished extraction entities per process_id"/>
<DIAttribute name="Parallelizable" value="no"/>
<DIAttribute name="isScriptValidationFunction" value="no"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$P_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="IN" name="$P_FLAG" datatype="INT" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$L_ENTITY_COUNT" datatype="INT" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="VARCHAR" size="200" />
<DISteps>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($P_FLAG = 0)" >
<LOGICAL_OP op="EQ">
<VARIABLE_REFERENCE name="$P_FLAG" />
<CONSTANT value="0" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_COUNT" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'select COUNT(*) from dwabc.JOB_STREAM_STEP_DETAIL_RT where md_process_id = { $P_PROCESS_ID  } ')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="select COUNT(*) from dwabc.JOB_STREAM_STEP_DETAIL_RT where md_process_id = { $P_PROCESS_ID  } " datatype="VARCHAR" size="94" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($P_FLAG = 1)" >
<LOGICAL_OP op="EQ">
<VARIABLE_REFERENCE name="$P_FLAG" />
<CONSTANT value="1" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_COUNT" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'select COUNT(*) from dwabc.JOB_STREAM_STEP_DETAIL_RT where md_process_id = { $P_PROCESS_ID }   and STATUS in (\'SUCCESS\',\'ERROR\',\'WARNING\' ) ')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="select COUNT(*) from dwabc.JOB_STREAM_STEP_DETAIL_RT where md_process_id = { $P_PROCESS_ID }   and STATUS in ('SUCCESS','ERROR','WARNING' ) " datatype="VARCHAR" size="140" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($P_FLAG = -1)" >
<LOGICAL_OP op="EQ">
<VARIABLE_REFERENCE name="$P_FLAG" />
<CONSTANT value="-1" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_COUNT" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'select COUNT(*) from dwabc.JOB_STREAM_STEP_DETAIL_RT where md_process_id = { $P_PROCESS_ID }   and STATUS = \'ERROR\' ')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="select COUNT(*) from dwabc.JOB_STREAM_STEP_DETAIL_RT where md_process_id = { $P_PROCESS_ID }   and STATUS = 'ERROR' " datatype="VARCHAR" size="116" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
</DIIfStep>
</DIElse>
</DIIfStep>
</DIElse>
</DIIfStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr="$L_ENTITY_COUNT" >
<VARIABLE_REFERENCE name="$L_ENTITY_COUNT" />
</DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="FBI_GET_ERR_WF" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="#this function get list of workflow names that was finished with ERROR status&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# get list of workflow names that was finished with ERROR status&#xD;&#xA;$L_ERR_WF_LIST  = sql('DW_ABC_DS','SELECT STUFF ((SELECT DISTINCT \',\' +  DETAIL_NAME&#xD;&#xA;  &#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;   FROM dwabc.JOB_STREAM_STEP_DETAIL_RT&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;   where STATUS = \'ERROR\'&#xD;&#xA;  &#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9; and md_process_id = { $P_PROCESS_ID  }&#xD;&#xA;  &#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;   ORDER BY   \',\'  + DETAIL_NAME&#xD;&#xA;  &#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;       FOR XML PATH ( \'\' )),1,1,\'\') err_wf_names ');   &#xA;&#xD;&#xA;return  $L_ERR_WF_LIST;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
<DIAttribute name="Description" value="this function get list of workflow names that was finished with ERROR status"/>
<DIAttribute name="Parallelizable" value="no"/>
<DIAttribute name="isScriptValidationFunction" value="no"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$P_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$L_ERR_WF_LIST" datatype="VARCHAR" size="300" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="VARCHAR" size="200" />
<DISteps>
<DIAssignmentStep typeId="12" variable="$L_ERR_WF_LIST" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', 'SELECT STUFF ((SELECT DISTINCT \',\' +  DETAIL_NAME&#xD;&#xA;  &#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;   FROM dwabc.JOB_STREAM_STEP_DETAIL_RT&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;   where STATUS = \'ERROR\'&#xD;&#xA;  &#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9; and md_process_id = { $P_PROCESS_ID  }&#xD;&#xA;  &#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;   ORDER BY   \',\'  + DETAIL_NAME&#xD;&#xA;  &#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;       FOR XML PATH ( \'\' )),1,1,\'\') err_wf_names ')" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONSTANT value="SELECT STUFF ((SELECT DISTINCT ',' +  DETAIL_NAME&#xD;&#xA;  &#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;   FROM dwabc.JOB_STREAM_STEP_DETAIL_RT&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;   where STATUS = 'ERROR'&#xD;&#xA;  &#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9; and md_process_id = { $P_PROCESS_ID  }&#xD;&#xA;  &#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;   ORDER BY   ','  + DETAIL_NAME&#xD;&#xA;  &#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;       FOR XML PATH ( '' )),1,1,'') err_wf_names " datatype="VARCHAR" size="311" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr="$L_ERR_WF_LIST" >
<VARIABLE_REFERENCE name="$L_ERR_WF_LIST" />
</DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="FBI_GET_EXT_BEGIN_DATE_SYNTAX" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="#this function takes  rdbms type of source data&#xD;&#xA;&#xD;&#xA;# check rdbms_type &#xD;&#xA;IF (upper($P_RDBMS_TYPE) = upper('mssql'))&#xD;&#xA;&#x9;BEGIN&#xD;&#xA;     &#x9;$L_EXTRACT_BEGIN_DATE_STR='CONVERT(datetime,\''|| $P_EXTRACT_BEGIN_DATE ||'\',111)';&#xD;&#xA;&#x9;END &#xD;&#xA;IF (upper($P_RDBMS_TYPE) = upper('oracle'))&#xD;&#xA;&#x9;BEGIN&#xD;&#xA;            $L_EXTRACT_BEGIN_DATE_STR='to_date(\''|| $P_EXTRACT_BEGIN_DATE ||'\',\'yyyy.mm.dd HH24:MI:SS\')';&#xD;&#xA;&#x9;END &#xD;&#xA;&#xD;&#xA;IF (upper($P_RDBMS_TYPE) = upper('mysql'))&#xD;&#xA;&#x9;BEGIN&#xD;&#xA;            $L_EXTRACT_BEGIN_DATE_STR='STR_TO_DATE(\''|| $P_EXTRACT_BEGIN_DATE ||'\',\'%Y.%m.%d %k:%i:%S\')';&#xD;&#xA;&#x9;END &#xD;&#xA;&#xD;&#xA;IF (upper($P_RDBMS_TYPE) = upper('ucmdb'))&#xD;&#xA;&#x9;BEGIN&#xD;&#xA;            $L_EXTRACT_BEGIN_DATE_STR=to_char($P_EXTRACT_BEGIN_DATE,'YYYY-MM-DD')||'T'||to_char($P_EXTRACT_BEGIN_DATE,'HH24:MI:SS');&#xD;&#xA;&#x9;END &#xD;&#xA;&#xD;&#xA;IF (upper($P_RDBMS_TYPE) = upper('ucmdb'))&#xD;&#xA;&#x9;BEGIN&#xD;&#xA;            $L_EXTRACT_BEGIN_DATE_STR=to_char($P_EXTRACT_BEGIN_DATE,'YYYY-MM-DD')||'T'||to_char($P_EXTRACT_BEGIN_DATE,'HH24:MI:SS');&#xD;&#xA;&#x9;END &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;IF (upper($P_RDBMS_TYPE) = upper('alm'))&#xD;&#xA;&#x9;BEGIN&#xD;&#xA;            $L_EXTRACT_BEGIN_DATE_STR=to_char($P_EXTRACT_BEGIN_DATE,'YYYY-MM-DD')||' '||to_char($P_EXTRACT_BEGIN_DATE,'HH24:MI:SS');&#xD;&#xA;&#x9;END &#xD;&#xA;&#xD;&#xA;IF (upper($P_RDBMS_TYPE) = upper('postgresql'))&#xD;&#xA;&#x9;BEGIN&#xD;&#xA;            $L_EXTRACT_BEGIN_DATE_STR='to_timestamp(\''|| $P_EXTRACT_BEGIN_DATE ||'\',\'yyyy.mm.dd HH24:MI:SS\')';&#xD;&#xA;&#x9;END &#xD;&#xA;&#xD;&#xA;#( can add another rdbms type and right syntax for $P_EXTRACT_BEGIN_DATE by rdbms type  )&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;IF (upper($P_RDBMS_TYPE) = upper('sa'))&#xD;&#xA;&#x9;BEGIN&#xD;&#xA;            $L_EXTRACT_BEGIN_DATE_STR=to_char($P_EXTRACT_BEGIN_DATE,'YYYY.MM.DD HH24:MI:SS');&#xD;&#xA;&#x9;END &#xD;&#xA;&#xD;&#xA;IF (upper($P_RDBMS_TYPE) = upper('csa'))&#xD;&#xA;&#x9;BEGIN&#xD;&#xA;            $L_EXTRACT_BEGIN_DATE_STR=to_char($P_EXTRACT_BEGIN_DATE,'YYYY.MM.DD HH24:MI:SS');&#xD;&#xA;&#x9;END &#xD;&#xA;&#xD;&#xA;IF (upper($P_RDBMS_TYPE) = upper('script'))&#xD;&#xA;  BEGIN&#xD;&#xA;            $L_EXTRACT_BEGIN_DATE_STR=to_char($P_EXTRACT_BEGIN_DATE,'YYYY.MM.DD HH24:MI:SS');&#xD;&#xA;  END &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;IF (upper($P_RDBMS_TYPE) = upper('dbdict_mssql'))&#xD;&#xA;&#x9;BEGIN&#xD;&#xA;     &#x9;$L_EXTRACT_BEGIN_DATE_STR='CONVERT(datetime,\''|| $P_EXTRACT_BEGIN_DATE ||'\',111)';&#xD;&#xA;&#x9;END &#xD;&#xA;IF (upper($P_RDBMS_TYPE) = upper('dbdict_oracle'))&#xD;&#xA;&#x9;BEGIN&#xD;&#xA;            $L_EXTRACT_BEGIN_DATE_STR='to_date(\''|| $P_EXTRACT_BEGIN_DATE ||'\',\'yyyy.mm.dd HH24:MI:SS\')';&#xD;&#xA;&#x9;END &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;IF (upper($P_RDBMS_TYPE) = upper('aws_s3'))&#xD;&#xA;&#x9;BEGIN&#xD;&#xA;            $L_EXTRACT_BEGIN_DATE_STR=to_char(add_months($P_EXTRACT_BEGIN_DATE,-1),'yyyy-MM-dd');&#xD;&#xA;&#x9;END &#xD;&#xA;&#xD;&#xA;IF (upper($P_RDBMS_TYPE) = upper('dbdict_db2'))&#xD;&#xA;     BEGIN&#xD;&#xA;            $L_EXTRACT_BEGIN_DATE_STR='timestamp(replace(\''|| $P_EXTRACT_BEGIN_DATE ||'\',\'.\',\'-\'))';&#xD;&#xA;     END&#xD;&#xA;&#xD;&#xA;IF (upper($P_RDBMS_TYPE) = upper('db2'))&#xD;&#xA;     BEGIN&#xD;&#xA;            $L_EXTRACT_BEGIN_DATE_STR='timestamp(replace(\''|| $P_EXTRACT_BEGIN_DATE ||'\',\'.\',\'-\'))';&#xD;&#xA;     END &#xD;&#xA;&#xD;&#xA;# return value&#xD;&#xA;return   $L_EXTRACT_BEGIN_DATE_STR ;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
<DIAttribute name="Description" value="this function get right syntax for extract_begin_date by rdbms_type"/>
<DIAttribute name="Parallelizable" value="no"/>
<DIAttribute name="isScriptValidationFunction" value="no"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_EXTRACT_BEGIN_DATE" datatype="VARCHAR" size="20" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="VARCHAR" size="200" />
<DISteps>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(upper($P_RDBMS_TYPE) = upper('mssql'))" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="upper"  type="DI" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</FUNCTION_CALL>
<FUNCTION_CALL name="upper"  type="DI" >
<CONSTANT value="mssql" datatype="VARCHAR" size="5" />
</FUNCTION_CALL>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="(('CONVERT(datetime,\'' || $P_EXTRACT_BEGIN_DATE) || '\',111)')" >
<CONCAT>
<CONCAT>
<CONSTANT value="CONVERT(datetime,'" datatype="VARCHAR" size="18" />
<VARIABLE_REFERENCE name="$P_EXTRACT_BEGIN_DATE" />
</CONCAT>
<CONSTANT value="',111)" datatype="VARCHAR" size="6" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
</DIIf>
</DIIfStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(upper($P_RDBMS_TYPE) = upper('oracle'))" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="upper"  type="DI" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</FUNCTION_CALL>
<FUNCTION_CALL name="upper"  type="DI" >
<CONSTANT value="oracle" datatype="VARCHAR" size="6" />
</FUNCTION_CALL>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="(('to_date(\'' || $P_EXTRACT_BEGIN_DATE) || '\',\'yyyy.mm.dd HH24:MI:SS\')')" >
<CONCAT>
<CONCAT>
<CONSTANT value="to_date('" datatype="VARCHAR" size="9" />
<VARIABLE_REFERENCE name="$P_EXTRACT_BEGIN_DATE" />
</CONCAT>
<CONSTANT value="','yyyy.mm.dd HH24:MI:SS')" datatype="VARCHAR" size="26" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
</DIIf>
</DIIfStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(upper($P_RDBMS_TYPE) = upper('mysql'))" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="upper"  type="DI" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</FUNCTION_CALL>
<FUNCTION_CALL name="upper"  type="DI" >
<CONSTANT value="mysql" datatype="VARCHAR" size="5" />
</FUNCTION_CALL>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="(('STR_TO_DATE(\'' || $P_EXTRACT_BEGIN_DATE) || '\',\'%Y.%m.%d %k:%i:%S\')')" >
<CONCAT>
<CONCAT>
<CONSTANT value="STR_TO_DATE('" datatype="VARCHAR" size="13" />
<VARIABLE_REFERENCE name="$P_EXTRACT_BEGIN_DATE" />
</CONCAT>
<CONSTANT value="','%Y.%m.%d %k:%i:%S')" datatype="VARCHAR" size="22" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
</DIIf>
</DIIfStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(upper($P_RDBMS_TYPE) = upper('ucmdb'))" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="upper"  type="DI" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</FUNCTION_CALL>
<FUNCTION_CALL name="upper"  type="DI" >
<CONSTANT value="ucmdb" datatype="VARCHAR" size="5" />
</FUNCTION_CALL>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="((to_char($P_EXTRACT_BEGIN_DATE, 'YYYY-MM-DD') || 'T') || to_char($P_EXTRACT_BEGIN_DATE, 'HH24:MI:SS'))" >
<CONCAT>
<CONCAT>
<FUNCTION_CALL name="to_char"  type="DI" >
<VARIABLE_REFERENCE name="$P_EXTRACT_BEGIN_DATE" />
<CONSTANT value="YYYY-MM-DD" datatype="VARCHAR" size="10" />
</FUNCTION_CALL>
<CONSTANT value="T" datatype="VARCHAR" size="1" />
</CONCAT>
<FUNCTION_CALL name="to_char"  type="DI" >
<VARIABLE_REFERENCE name="$P_EXTRACT_BEGIN_DATE" />
<CONSTANT value="HH24:MI:SS" datatype="VARCHAR" size="10" />
</FUNCTION_CALL>
</CONCAT>
</DIExpression>
</DIAssignmentStep>
</DIIf>
</DIIfStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(upper($P_RDBMS_TYPE) = upper('ucmdb'))" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="upper"  type="DI" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</FUNCTION_CALL>
<FUNCTION_CALL name="upper"  type="DI" >
<CONSTANT value="ucmdb" datatype="VARCHAR" size="5" />
</FUNCTION_CALL>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="((to_char($P_EXTRACT_BEGIN_DATE, 'YYYY-MM-DD') || 'T') || to_char($P_EXTRACT_BEGIN_DATE, 'HH24:MI:SS'))" >
<CONCAT>
<CONCAT>
<FUNCTION_CALL name="to_char"  type="DI" >
<VARIABLE_REFERENCE name="$P_EXTRACT_BEGIN_DATE" />
<CONSTANT value="YYYY-MM-DD" datatype="VARCHAR" size="10" />
</FUNCTION_CALL>
<CONSTANT value="T" datatype="VARCHAR" size="1" />
</CONCAT>
<FUNCTION_CALL name="to_char"  type="DI" >
<VARIABLE_REFERENCE name="$P_EXTRACT_BEGIN_DATE" />
<CONSTANT value="HH24:MI:SS" datatype="VARCHAR" size="10" />
</FUNCTION_CALL>
</CONCAT>
</DIExpression>
</DIAssignmentStep>
</DIIf>
</DIIfStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(upper($P_RDBMS_TYPE) = upper('alm'))" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="upper"  type="DI" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</FUNCTION_CALL>
<FUNCTION_CALL name="upper"  type="DI" >
<CONSTANT value="alm" datatype="VARCHAR" size="3" />
</FUNCTION_CALL>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="((to_char($P_EXTRACT_BEGIN_DATE, 'YYYY-MM-DD') || ' ') || to_char($P_EXTRACT_BEGIN_DATE, 'HH24:MI:SS'))" >
<CONCAT>
<CONCAT>
<FUNCTION_CALL name="to_char"  type="DI" >
<VARIABLE_REFERENCE name="$P_EXTRACT_BEGIN_DATE" />
<CONSTANT value="YYYY-MM-DD" datatype="VARCHAR" size="10" />
</FUNCTION_CALL>
<CONSTANT value=" " datatype="VARCHAR" size="1" />
</CONCAT>
<FUNCTION_CALL name="to_char"  type="DI" >
<VARIABLE_REFERENCE name="$P_EXTRACT_BEGIN_DATE" />
<CONSTANT value="HH24:MI:SS" datatype="VARCHAR" size="10" />
</FUNCTION_CALL>
</CONCAT>
</DIExpression>
</DIAssignmentStep>
</DIIf>
</DIIfStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(upper($P_RDBMS_TYPE) = upper('postgresql'))" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="upper"  type="DI" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</FUNCTION_CALL>
<FUNCTION_CALL name="upper"  type="DI" >
<CONSTANT value="postgresql" datatype="VARCHAR" size="10" />
</FUNCTION_CALL>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="(('to_timestamp(\'' || $P_EXTRACT_BEGIN_DATE) || '\',\'yyyy.mm.dd HH24:MI:SS\')')" >
<CONCAT>
<CONCAT>
<CONSTANT value="to_timestamp('" datatype="VARCHAR" size="14" />
<VARIABLE_REFERENCE name="$P_EXTRACT_BEGIN_DATE" />
</CONCAT>
<CONSTANT value="','yyyy.mm.dd HH24:MI:SS')" datatype="VARCHAR" size="26" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
</DIIf>
</DIIfStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(upper($P_RDBMS_TYPE) = upper('sa'))" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="upper"  type="DI" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</FUNCTION_CALL>
<FUNCTION_CALL name="upper"  type="DI" >
<CONSTANT value="sa" datatype="VARCHAR" size="2" />
</FUNCTION_CALL>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="to_char($P_EXTRACT_BEGIN_DATE, 'YYYY.MM.DD HH24:MI:SS')" >
<FUNCTION_CALL name="to_char"  type="DI" >
<VARIABLE_REFERENCE name="$P_EXTRACT_BEGIN_DATE" />
<CONSTANT value="YYYY.MM.DD HH24:MI:SS" datatype="VARCHAR" size="21" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
</DIIfStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(upper($P_RDBMS_TYPE) = upper('csa'))" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="upper"  type="DI" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</FUNCTION_CALL>
<FUNCTION_CALL name="upper"  type="DI" >
<CONSTANT value="csa" datatype="VARCHAR" size="3" />
</FUNCTION_CALL>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="to_char($P_EXTRACT_BEGIN_DATE, 'YYYY.MM.DD HH24:MI:SS')" >
<FUNCTION_CALL name="to_char"  type="DI" >
<VARIABLE_REFERENCE name="$P_EXTRACT_BEGIN_DATE" />
<CONSTANT value="YYYY.MM.DD HH24:MI:SS" datatype="VARCHAR" size="21" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
</DIIfStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(upper($P_RDBMS_TYPE) = upper('script'))" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="upper"  type="DI" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</FUNCTION_CALL>
<FUNCTION_CALL name="upper"  type="DI" >
<CONSTANT value="script" datatype="VARCHAR" size="6" />
</FUNCTION_CALL>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="to_char($P_EXTRACT_BEGIN_DATE, 'YYYY.MM.DD HH24:MI:SS')" >
<FUNCTION_CALL name="to_char"  type="DI" >
<VARIABLE_REFERENCE name="$P_EXTRACT_BEGIN_DATE" />
<CONSTANT value="YYYY.MM.DD HH24:MI:SS" datatype="VARCHAR" size="21" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
</DIIfStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(upper($P_RDBMS_TYPE) = upper('dbdict_mssql'))" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="upper"  type="DI" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</FUNCTION_CALL>
<FUNCTION_CALL name="upper"  type="DI" >
<CONSTANT value="dbdict_mssql" datatype="VARCHAR" size="12" />
</FUNCTION_CALL>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="(('CONVERT(datetime,\'' || $P_EXTRACT_BEGIN_DATE) || '\',111)')" >
<CONCAT>
<CONCAT>
<CONSTANT value="CONVERT(datetime,'" datatype="VARCHAR" size="18" />
<VARIABLE_REFERENCE name="$P_EXTRACT_BEGIN_DATE" />
</CONCAT>
<CONSTANT value="',111)" datatype="VARCHAR" size="6" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
</DIIf>
</DIIfStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(upper($P_RDBMS_TYPE) = upper('dbdict_oracle'))" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="upper"  type="DI" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</FUNCTION_CALL>
<FUNCTION_CALL name="upper"  type="DI" >
<CONSTANT value="dbdict_oracle" datatype="VARCHAR" size="13" />
</FUNCTION_CALL>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="(('to_date(\'' || $P_EXTRACT_BEGIN_DATE) || '\',\'yyyy.mm.dd HH24:MI:SS\')')" >
<CONCAT>
<CONCAT>
<CONSTANT value="to_date('" datatype="VARCHAR" size="9" />
<VARIABLE_REFERENCE name="$P_EXTRACT_BEGIN_DATE" />
</CONCAT>
<CONSTANT value="','yyyy.mm.dd HH24:MI:SS')" datatype="VARCHAR" size="26" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
</DIIf>
</DIIfStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(upper($P_RDBMS_TYPE) = upper('aws_s3'))" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="upper"  type="DI" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</FUNCTION_CALL>
<FUNCTION_CALL name="upper"  type="DI" >
<CONSTANT value="aws_s3" datatype="VARCHAR" size="6" />
</FUNCTION_CALL>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="to_char(add_months($P_EXTRACT_BEGIN_DATE, -1), 'yyyy-MM-dd')" >
<FUNCTION_CALL name="to_char"  type="DI" >
<FUNCTION_CALL name="add_months"  type="DI" >
<VARIABLE_REFERENCE name="$P_EXTRACT_BEGIN_DATE" />
<CONSTANT value="-1" datatype="INT" />
</FUNCTION_CALL>
<CONSTANT value="yyyy-MM-dd" datatype="VARCHAR" size="10" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
</DIIfStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(upper($P_RDBMS_TYPE) = upper('dbdict_db2'))" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="upper"  type="DI" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</FUNCTION_CALL>
<FUNCTION_CALL name="upper"  type="DI" >
<CONSTANT value="dbdict_db2" datatype="VARCHAR" size="10" />
</FUNCTION_CALL>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="(('timestamp(replace(\'' || $P_EXTRACT_BEGIN_DATE) || '\',\'.\',\'-\'))')" >
<CONCAT>
<CONCAT>
<CONSTANT value="timestamp(replace('" datatype="VARCHAR" size="19" />
<VARIABLE_REFERENCE name="$P_EXTRACT_BEGIN_DATE" />
</CONCAT>
<CONSTANT value="','.','-'))" datatype="VARCHAR" size="11" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
</DIIf>
</DIIfStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(upper($P_RDBMS_TYPE) = upper('db2'))" >
<LOGICAL_OP op="EQ">
<FUNCTION_CALL name="upper"  type="DI" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</FUNCTION_CALL>
<FUNCTION_CALL name="upper"  type="DI" >
<CONSTANT value="db2" datatype="VARCHAR" size="3" />
</FUNCTION_CALL>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="(('timestamp(replace(\'' || $P_EXTRACT_BEGIN_DATE) || '\',\'.\',\'-\'))')" >
<CONCAT>
<CONCAT>
<CONSTANT value="timestamp(replace('" datatype="VARCHAR" size="19" />
<VARIABLE_REFERENCE name="$P_EXTRACT_BEGIN_DATE" />
</CONCAT>
<CONSTANT value="','.','-'))" datatype="VARCHAR" size="11" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
</DIIf>
</DIIfStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr="$L_EXTRACT_BEGIN_DATE_STR" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE_STR" />
</DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="FBI_GET_FILELOCATION" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="#this function takes  the target directory for the files&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# lookup for location&#xD;&#xA; $L_FILE_LOCATION =  lookup_ext([DW_METADATA_DS.DW_METADATA_ALIAS.FILE_LOCATION_INFO, 'PRE_LOAD_CACHE', 'MAX'], &#xD;&#xA;                               [ FILE_LOCATION ], &#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;   [ NULL ], &#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;   [ SOURCE, '=', $P_PRODUCT_NAME ]) &#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;SET(&quot;run_as_separate_process&quot; = 'no');&#xD;&#xA;&#xD;&#xA;# return value&#xD;&#xA;return  $L_FILE_LOCATION;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
<DIAttribute name="Description" value="this function get the target directory for the files from file_location_info"/>
<DIAttribute name="Parallelizable" value="no"/>
<DIAttribute name="isScriptValidationFunction" value="no"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$P_PRODUCT_NAME" datatype="VARCHAR" size="50" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$L_FILE_LOCATION" datatype="VARCHAR" size="200" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="VARCHAR" size="200" />
<DISteps>
<DIAssignmentStep typeId="12" variable="$L_FILE_LOCATION" >
<DIExpression isString="true" expr="lookup_ext([DW_METADATA_DS.DW_METADATA_ALIAS.FILE_LOCATION_INFO, 'PRE_LOAD_CACHE', 'MAX'], [ FILE_LOCATION ], [  NULL  ], [ SOURCE, '=', $P_PRODUCT_NAME ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xA;" >
<FUNCTION_CALL name="lookup_ext"  type="DI" tableDatastore="DW_METADATA_DS" tableOwner="DW_METADATA_ALIAS" tableName="FILE_LOCATION_INFO" >
<CONSTANT value="PRE_LOAD_CACHE" datatype="VARCHAR" size="14" />
<CONSTANT value="MAX" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$P_PRODUCT_NAME" />
<CONSTANT_NULL /><DIAttributes>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr="$L_FILE_LOCATION" >
<VARIABLE_REFERENCE name="$L_FILE_LOCATION" />
</DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="FBI_GET_INITIAL_LOAD_M_V" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value=" #this function takes property_value for initial_load_m_v from DW_CONFIGURATION&#xD;&#xA;&#xD;&#xA;# get property_name&#xD;&#xA;$L_PROPERTY_NAME = 'dwh.etl.initialloadmonths';&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;$L_INITIAL_LOAD_M_V  = sql('DW_METADATA_DS','SELECT T2.PropertyValue  FROM dwmetadata.DataSourceConnection T1,  dwmetadata.DatasourceGenericProperty T2 WHERE T1.CP_ID='||$p_contentpack_id||' AND T1.Hjid=T2.ConnectionId AND T2.PropertyName=\''||$L_PROPERTY_NAME|| '\'');&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; if ($L_INITIAL_LOAD_M_V is null or $L_INITIAL_LOAD_M_V=0)&#xD;&#xA;  begin&#xD;&#xA;&#xD;&#xA;# lookup for property_value&#xD;&#xA;$L_INITIAL_LOAD_M_V  = lookup_ext([DW_METADATA_DS.DW_METADATA_ALIAS.DW_CONFIGURATION,'PRE_LOAD_CACHE','MAX'], &#xD;&#xA;                                 [PROPERTY_VALUE],&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9; ['6'],&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9; [PROPERTY_NAME, '=',$L_PROPERTY_NAME])  &#xD;&#xA;                       SET (&quot;run_as_separate_process&quot;='no');&#xD;&#xA;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;# return value&#xD;&#xA;return  $L_INITIAL_LOAD_M_V;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$p_contentpack_id" datatype="INT" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$L_PROPERTY_NAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INITIAL_LOAD_M_V" datatype="VARCHAR" size="50" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="VARCHAR" size="50" />
<DISteps>
<DIAssignmentStep typeId="12" variable="$L_PROPERTY_NAME" >
<DIExpression isString="true" expr="'dwh.etl.initialloadmonths'" >
<CONSTANT value="dwh.etl.initialloadmonths" datatype="VARCHAR" size="25" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_INITIAL_LOAD_M_V" >
<DIExpression isString="true" expr="sql('DW_METADATA_DS', (((('SELECT T2.PropertyValue  FROM dwmetadata.DataSourceConnection T1,  dwmetadata.DatasourceGenericProperty T2 WHERE T1.CP_ID=' || $p_contentpack_id) || ' AND T1.Hjid=T2.ConnectionId AND T2.PropertyName=\'') || $L_PROPERTY_NAME) || '\''))" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_METADATA_DS" datatype="VARCHAR" size="14" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="SELECT T2.PropertyValue  FROM dwmetadata.DataSourceConnection T1,  dwmetadata.DatasourceGenericProperty T2 WHERE T1.CP_ID=" datatype="VARCHAR" size="122" />
<VARIABLE_REFERENCE name="$p_contentpack_id" />
</CONCAT>
<CONSTANT value=" AND T1.Hjid=T2.ConnectionId AND T2.PropertyName='" datatype="VARCHAR" size="50" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_PROPERTY_NAME" />
</CONCAT>
<CONSTANT value="'" datatype="VARCHAR" size="1" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="(($L_INITIAL_LOAD_M_V IS  NULL ) OR&#xA;   ($L_INITIAL_LOAD_M_V = 0))" >
<LOGICAL_OP op="OR">
<LOGICAL_OP op="IS NULL">
<VARIABLE_REFERENCE name="$L_INITIAL_LOAD_M_V" />
</LOGICAL_OP>
<LOGICAL_OP op="EQ">
<VARIABLE_REFERENCE name="$L_INITIAL_LOAD_M_V" />
<CONSTANT value="0" datatype="INT" />
</LOGICAL_OP>
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_INITIAL_LOAD_M_V" >
<DIExpression isString="true" expr="lookup_ext([DW_METADATA_DS.DW_METADATA_ALIAS.DW_CONFIGURATION, 'PRE_LOAD_CACHE', 'MAX'], [ PROPERTY_VALUE ], [ '6' ], [ PROPERTY_NAME, '=', $L_PROPERTY_NAME ]) &#xA;SET(&quot;run_as_separate_process&quot; = 'no')&#xA;" >
<FUNCTION_CALL name="lookup_ext"  type="DI" tableDatastore="DW_METADATA_DS" tableOwner="DW_METADATA_ALIAS" tableName="DW_CONFIGURATION" >
<CONSTANT value="PRE_LOAD_CACHE" datatype="VARCHAR" size="14" />
<CONSTANT value="MAX" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_PROPERTY_NAME" />
<CONSTANT value="6" datatype="VARCHAR" size="1" />
<DIAttributes>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
</DIIfStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr="$L_INITIAL_LOAD_M_V" >
<VARIABLE_REFERENCE name="$L_INITIAL_LOAD_M_V" />
</DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="#this function takes instraction id fron instraction table for run extract batch&#xD;&#xA;&#xD;&#xA;# lookup for rdbms type&#xD;&#xA;$L_INSTRACTION_ID = sql('DW_ABC_DS','select INSTRUCTION_ID from INSTRUCTION where MD_PROCESS_ID = '||$P_PROCESS_ID||' and  STEP_DETAIL_WF_NAME = \''||$P_WF_NAME||'\'  ');&#xD;&#xA;# in th future must be &gt;&gt;&gt; $L_RDBMS_TYPE = sql('DW_METADATA_DS','select RdbmsType from dwmetadata.content_pack where ProductName = \'' ||$G_PRODUCT_NAME ||'\' and {$p_contentpack_id}'); &#xD;&#xA;&#xD;&#xA;# return value&#xD;&#xA;return   $L_INSTRACTION_ID ;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$P_PROCESS_ID" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="VARCHAR" size="20" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="VARCHAR" size="200" />
<DISteps>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="sql('DW_ABC_DS', (((('select INSTRUCTION_ID from INSTRUCTION where MD_PROCESS_ID = ' || $P_PROCESS_ID) || ' and  STEP_DETAIL_WF_NAME = \'') || $P_WF_NAME) || '\'  '))" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_ABC_DS" datatype="VARCHAR" size="9" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="select INSTRUCTION_ID from INSTRUCTION where MD_PROCESS_ID = " datatype="VARCHAR" size="61" />
<VARIABLE_REFERENCE name="$P_PROCESS_ID" />
</CONCAT>
<CONSTANT value=" and  STEP_DETAIL_WF_NAME = '" datatype="VARCHAR" size="29" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</CONCAT>
<CONSTANT value="'  " datatype="VARCHAR" size="3" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr="$L_INSTRACTION_ID" >
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIScriptFunction name="FBI_GET_RDBMS_TYPE" typeId="11" >
<DIUIOptions>
<DIAttribute name="ui_script_text" value="#this function lookups for rdbms type of source product&#xD;&#xA;&#xD;&#xA;&#xD;&#xA; $L_RDBMS_TYPE = sql('DW_METADATA_DS','select ProductType from dwmetadata.DataSourceConnection where ProductName = \''||$P_PRODUCT_NAME ||'\' and CP_ID={$P_CONTENT_PACK_ID}');&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;return   $L_RDBMS_TYPE ;"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Acta_user_func_category" value="User_Script_Function"/>
<DIAttribute name="Description" value="this function get the rdbms type of sorce data"/>
<DIAttribute name="Parallelizable" value="no"/>
<DIAttribute name="isScriptValidationFunction" value="no"/>
</DIProperties>
<DIParameters><DIElement paramType="IN" name="$P_PRODUCT_NAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_CONTENT_PACK_ID" datatype="INT" >
</DIElement>
</DIParameters>
<DIVariables><DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="20" >
</DIElement>
</DIVariables>
<DIFunctionReturn datatype="VARCHAR" size="200" />
<DISteps>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="sql('DW_METADATA_DS', (('select ProductType from dwmetadata.DataSourceConnection where ProductName = \'' || $P_PRODUCT_NAME) || '\' and CP_ID={$P_CONTENT_PACK_ID}'))" >
<FUNCTION_CALL name="sql"  type="DI" >
<CONSTANT value="DW_METADATA_DS" datatype="VARCHAR" size="14" />
<CONCAT>
<CONCAT>
<CONSTANT value="select ProductType from dwmetadata.DataSourceConnection where ProductName = '" datatype="VARCHAR" size="77" />
<VARIABLE_REFERENCE name="$P_PRODUCT_NAME" />
</CONCAT>
<CONSTANT value="' and CP_ID={$P_CONTENT_PACK_ID}" datatype="VARCHAR" size="32" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIReturnStep typeId="30" >
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
</DIReturnStep>
</DISteps>
</DIScriptFunction>
<DIJob name="AM_SOURCE_EXTRACT_JB" typeId="2" >
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="PRODUCT_SOURCE_EXTRACT_JB (version 0.13.0-SNAPSHOT)"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Fri, 23 Jan 2009 10:50:13"/>
<DIAttribute name="Description" value="The BO DS job AM_SOURCE_EXTRACT_JB is responsible for extracting data from a source  system.   Data is extracted based on a specific date criteria and then written to delimited flat files on the BO job server.  The use a date criteria is to enable the processing of delta data only.  Data that has been modified after the date being used will be written to the target files.  The data will remain un-cleansed and not validated.  &#xA;Flat file targets are used to decouple the source system database from the target database.  By decoupling the two databases there will be no process that has a database connection to the source system open while also having a connection open on the target system.  This will ensure that any issues or performance problems on the target system will not affect the source system.&#xA;The files will also be used for the following:&#xA;Source files for the EXT load ETL job&#xA;Recovery files for disaster recovery&#xA;The BO DS job will be composed of a set of workflows that contain dataflows.  There will be one workflow per dataflow.  There will also be one target table per dataflow.  The extraction process workflows are independent from each other.  Because of this the workflows can be executed in parallel.&#xA;The BO DS job will require the use of global variables.  These variables will be used in every workflow in the job.  These global variables will be set at the start of the job.  Because the workflows will be executed in parallel the global variables must be set at a level higher than the workflows there will be a container workflow that holds all other workflows."/>
<DIAttribute name="Web_Service_Enabled" value="YES"/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_FINISH_ENTITY_COUNT" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_COUNT" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ERR_COUNT" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ERR_WF_LIST" datatype="VARCHAR" size="300" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_DEBUG_MODE" datatype="INT" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_TRACE_MODE" datatype="INT" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_AM_FILELOCATION" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_INITIAL_LOAD_M_V" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_INITIAL_LOAD_M" datatype="DECIMAL" precision="10" scale="2" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_PRODUCT_NAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_CONTENT_PACK_ID" datatype="INT" >
</DIElement>
<DIElement paramType="GLOBAL" name="$G_WAITING_RUNNING_WF" datatype="INT" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ui_display_name" value="AM_SOURCE_EXTRACT_JB_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="STARTJB_SC is used to set global variables and initiates the metadata tracking for the Job"/>
<DIAttribute name="ui_display_name" value="STARTJB_SC"/>
<DIAttribute name="ui_script_text" value="# INITIALIZE STATE &#xD;&#xA;&#xD;&#xA;# PRODUCT_NAME&#xD;&#xA;$G_PRODUCT_NAME = 'AM';&#xD;&#xA;&#xD;&#xA;#FILES TARGET DIRECTORY&#xD;&#xA;$G_AM_FILELOCATION = FBI_GET_FILELOCATION( $G_PRODUCT_NAME ) ;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;#Initialize G_WAITING_RUNNING_WF ( for sleep function ) =&gt; 1 Minutes = 60000 Milliseconds &#xD;&#xA;$G_WAITING_RUNNING_WF=3000;&#xD;&#xA;&#xD;&#xA;# FORMAT NUMBER OF MONTHS BACKWARDS TO START INITIAIL LOAD FROM&#xD;&#xA;$G_INITIAL_LOAD_M_V = fbi_get_initial_load_m_v($G_CONTENT_PACK_ID)  ;&#xD;&#xA;$G_INITIAL_LOAD_M = to_decimal($G_INITIAL_LOAD_M_V, '.', ',', 0);&#xD;&#xA;&#xD;&#xA;#CALL FUNCTION TO TRACK START OF JOB ( update rows in JOB_STREAM_STEP_RT )&#xD;&#xA;ABC_STARTJB_FN($G_PROCESS_ID, $G_DEBUG_MODE, $G_BATCH_ID);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;ETL_PRINT('****************************************************************************************************************');&#xD;&#xA;ETL_PRINT(' ');&#xD;&#xA;ETL_PRINT('The Flat File will be located in the '||$G_AM_FILELOCATION||' directory.' );&#xD;&#xA;ETL_PRINT(' ');&#xD;&#xA;ETL_PRINT('****************************************************************************************************************');&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$G_PRODUCT_NAME" >
<DIExpression isString="true" expr="'AM'" >
<CONSTANT value="AM" datatype="VARCHAR" size="2" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$G_AM_FILELOCATION" >
<DIExpression isString="true" expr="fbi_get_filelocation($G_PRODUCT_NAME)" >
<FUNCTION_CALL name="fbi_get_filelocation"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$G_WAITING_RUNNING_WF" >
<DIExpression isString="true" expr="3000" >
<CONSTANT value="3000" datatype="INT" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$G_INITIAL_LOAD_M_V" >
<DIExpression isString="true" expr="fbi_get_initial_load_m_v($G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_initial_load_m_v"  type="DI" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$G_INITIAL_LOAD_M" >
<DIExpression isString="true" expr="to_decimal($G_INITIAL_LOAD_M_V, '.', ',', 0)" >
<FUNCTION_CALL name="to_decimal"  type="DI" >
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M_V" />
<CONSTANT value="." datatype="VARCHAR" size="1" />
<CONSTANT value="," datatype="VARCHAR" size="1" />
<CONSTANT value="0" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startjb_fn($G_PROCESS_ID, $G_DEBUG_MODE, $G_BATCH_ID)" >
<FUNCTION_CALL name="abc_startjb_fn"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$G_DEBUG_MODE" />
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('****************************************************************************************************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="****************************************************************************************************************" datatype="VARCHAR" size="112" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(' ')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value=" " datatype="VARCHAR" size="1" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The Flat File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The Flat File will be located in the " datatype="VARCHAR" size="37" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(' ')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value=" " datatype="VARCHAR" size="1" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print('****************************************************************************************************************')" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONSTANT value="****************************************************************************************************************" datatype="VARCHAR" size="112" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_SOURCE_EXTRACT_CONTAINER_WF" >
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ui_display_name" value="CHECK_EXTRACTION_SCR"/>
<DIAttribute name="ui_script_text" value="#Initialize count for error status&#xD;&#xA;$L_ERR_COUNT=0;&#xD;&#xA;#get number of entities per running process id&#xD;&#xA;$L_ENTITY_COUNT = FBI_GET_ENTITY_COUNT($G_PROCESS_ID ,0);&#xD;&#xA; &#xD;&#xA;#get count of finished entities with statuts  : SUCCESS, ERROR, WARNING&#xD;&#xA;$L_FINISH_ENTITY_COUNT = FBI_GET_ENTITY_COUNT($G_PROCESS_ID ,1);&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;#check finished entities&#xD;&#xA;while (($L_FINISH_ENTITY_COUNT &lt; $L_ENTITY_COUNT ) )&#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;# wait function&#xD;&#xA;&#x9;&#x9;sleep($G_WAITING_RUNNING_WF);&#xD;&#xA;&#x9;&#x9;#get count of finished entities with statuts  : SUCCESS, ERROR, WARNING after waiting&#xD;&#xA;&#x9;&#x9;$L_FINISH_ENTITY_COUNT = FBI_GET_ENTITY_COUNT($G_PROCESS_ID ,1);&#xD;&#xA;        print('EXTRACT FILES OF PROCESS_ID -&gt; {$G_PROCESS_ID} STILL WORKING!!');&#xD;&#xA;       &#x9;&#x9;&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;$L_ERR_COUNT=FBI_GET_ENTITY_COUNT($G_PROCESS_ID ,-1);&#xD;&#xA;&#x9;&#xD;&#xA;if ($L_ERR_COUNT&lt;&gt;0)&#xD;&#xA;&#xD;&#xA;begin&#xD;&#xA;&#x9;$L_ERR_WF_LIST = FBI_GET_ERR_WF( $G_PROCESS_ID );&#xD;&#xA;&#x9;raise_exception( 'ERROR - WorkFlow !!! One or more entities &gt;&gt; {$L_ERR_WF_LIST} &lt;&lt; ended with Error status !!! Please check it !!!! ');&#xD;&#xA;end&#x9;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_ERR_COUNT" >
<DIExpression isString="true" expr="0" >
<CONSTANT value="0" datatype="INT" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_COUNT" >
<DIExpression isString="true" expr="fbi_get_entity_count($G_PROCESS_ID, 0)" >
<FUNCTION_CALL name="fbi_get_entity_count"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONSTANT value="0" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_FINISH_ENTITY_COUNT" >
<DIExpression isString="true" expr="fbi_get_entity_count($G_PROCESS_ID, 1)" >
<FUNCTION_CALL name="fbi_get_entity_count"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONSTANT value="1" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIWhileStep typeId="10" >
<DIExpression isString="true" expr="($L_FINISH_ENTITY_COUNT &lt; $L_ENTITY_COUNT)" >
<LOGICAL_OP op="LT">
<VARIABLE_REFERENCE name="$L_FINISH_ENTITY_COUNT" />
<VARIABLE_REFERENCE name="$L_ENTITY_COUNT" />
</LOGICAL_OP>
</DIExpression>
<DISteps>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="sleep($G_WAITING_RUNNING_WF)" >
<FUNCTION_CALL name="sleep"  type="DI" >
<VARIABLE_REFERENCE name="$G_WAITING_RUNNING_WF" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_FINISH_ENTITY_COUNT" >
<DIExpression isString="true" expr="fbi_get_entity_count($G_PROCESS_ID, 1)" >
<FUNCTION_CALL name="fbi_get_entity_count"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONSTANT value="1" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('EXTRACT FILES OF PROCESS_ID -&gt; {$G_PROCESS_ID} STILL WORKING!!')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="EXTRACT FILES OF PROCESS_ID -&gt; {$G_PROCESS_ID} STILL WORKING!!" datatype="VARCHAR" size="62" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DISteps>
</DIWhileStep>
<DIAssignmentStep typeId="12" variable="$L_ERR_COUNT" >
<DIExpression isString="true" expr="fbi_get_entity_count($G_PROCESS_ID, -1)" >
<FUNCTION_CALL name="fbi_get_entity_count"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONSTANT value="-1" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_ERR_COUNT != 0)" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_ERR_COUNT" />
<CONSTANT value="0" datatype="INT" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIAssignmentStep typeId="12" variable="$L_ERR_WF_LIST" >
<DIExpression isString="true" expr="fbi_get_err_wf($G_PROCESS_ID)" >
<FUNCTION_CALL name="fbi_get_err_wf"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR - WorkFlow !!! One or more entities &gt;&gt; {$L_ERR_WF_LIST} &lt;&lt; ended with Error status !!! Please check it !!!! ')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR - WorkFlow !!! One or more entities &gt;&gt; {$L_ERR_WF_LIST} &lt;&lt; ended with Error status !!! Please check it !!!! " datatype="VARCHAR" size="114" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
</DIScript>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="ENDJB_SC concludes the metadata for the Job and Adds final Entries into the ABC Tracking system"/>
<DIAttribute name="ui_display_name" value="ENDJB_SC"/>
<DIAttribute name="ui_script_text" value="ABC_ENDJB_FN($G_PROCESS_ID);&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_endjb_fn($G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_endjb_fn"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ui_display_name" value="AM_SOURCE_EXTRACT_JB_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ui_display_name" value="AM_SOURCE_EXTRACT_JB_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="ABC_FAILJB_FN($G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());&#xD;&#xA;"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failjb_fn($G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failjb_fn"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="job_checkpoint_enabled" value="no"/>
<DIAttribute name="job_collect_statistics" value="no"/>
<DIAttribute name="job_collect_statistics_monitor" value="no"/>
<DIAttribute name="job_enable_assemblers" value="yes"/>
<DIAttribute name="job_enable_audit" value="yes"/>
<DIAttribute name="job_enable_dataquality" value="yes"/>
<DIAttribute name="job_export_repo" value="no"/>
<DIAttribute name="job_export_reports" value="no"/>
<DIAttribute name="job_isrecoverable" value="no"/>
<DIAttribute name="job_mode" value="Multi-Process"/>
<DIAttribute name="job_monitor_sample_rate" value="1000"/>
<DIAttribute name="job_name" value="AM_SOURCE_EXTRACT_JB"/>
<DIAttribute name="job_print_version" value="no"/>
<DIAttribute name="job_testmode_enabled" value="no"/>
<DIAttribute name="job_trace_abapquery" value="no"/>
<DIAttribute name="job_trace_all" value="no"/>
<DIAttribute name="job_trace_ascomm" value="no"/>
<DIAttribute name="job_trace_assemblers" value="no"/>
<DIAttribute name="job_trace_audit" value="no"/>
<DIAttribute name="job_trace_dataflow" value="yes"/>
<DIAttribute name="job_trace_idoc_file" value="no"/>
<DIAttribute name="job_trace_memory_loader" value="no"/>
<DIAttribute name="job_trace_memory_reader" value="no"/>
<DIAttribute name="job_trace_optimized_dataflow" value="no"/>
<DIAttribute name="job_trace_parallel_execution" value="no"/>
<DIAttribute name="job_trace_rfc_function" value="no"/>
<DIAttribute name="job_trace_row" value="no"/>
<DIAttribute name="job_trace_script" value="no"/>
<DIAttribute name="job_trace_session" value="yes"/>
<DIAttribute name="job_trace_sql_only" value="no"/>
<DIAttribute name="job_trace_sqlfunctions" value="no"/>
<DIAttribute name="job_trace_sqlloaders" value="no"/>
<DIAttribute name="job_trace_sqlreaders" value="no"/>
<DIAttribute name="job_trace_sqltransforms" value="no"/>
<DIAttribute name="job_trace_stored_procedure" value="no"/>
<DIAttribute name="job_trace_table" value="no"/>
<DIAttribute name="job_trace_table_reader" value="no"/>
<DIAttribute name="job_trace_transform" value="no"/>
<DIAttribute name="job_trace_userfunction" value="no"/>
<DIAttribute name="job_trace_usertransform" value="no"/>
<DIAttribute name="job_trace_workflow" value="yes"/>
<DIAttribute name="job_type" value="batch"/>
<DIAttribute name="job_use_statistics" value="yes"/>
<DIAttribute name="locale_codepage" value="&lt;default&gt;"/>
<DIAttribute name="locale_language" value="&lt;default&gt;"/>
<DIAttribute name="locale_territory" value="&lt;default&gt;"/>
</DIAttributes>
</DIJob>
<DIWorkflow name="AM_SOURCE_EXTRACT_CONTAINER_WF" typeId="2" >
<DIProperties>
<DIAttribute name="Description" value="This Workflow was created in order to house several workflows that will extract data into files from the source system"/>
</DIProperties>
<DISteps>
<DIParallelStep typeId="11" >
<DISteps>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_SOURCE_EXTRACT_GEN_CONT_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_SOURCE_EXTRACT_CUSTOM_CONT_WF" >
</DICallStep>
</DISteps>
</DIParallelStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIWorkflow name="AM_SOURCE_EXTRACT_GEN_CONT_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow is a container for the entities concerned by the SOURCE_EXTRACT ETL Step for the source product AM"/>
</DIAnnotation></DIUIOptions>
<DIProperties>
<DIAttribute name="GeneratorTemplate" value="ENTITY_LEVEL_FOR_PRODUCT_CONTAINER_WF (version 0.13.0-SNAPSHOT)"/>
<DIAttribute name="GeneratorVersion" value="v1.0"/>
<DIAttribute name="GenerationDate" value="Fri, 23 Jan 2009 10:50:13"/>
<DIAttribute name="Description" value="This workflow is a container for the entities concerned by the SOURCE_EXTRACT ETL Step for the source product AM. It integrates the following entities:&#xD;&#xA;  - ACTUALCOST (version 1)&#xD;&#xA;  - ASSET (version 1)&#xD;&#xA;  - BUDGETLINE (version 1)&#xD;&#xA;  - CFGITEM (version 1)&#xD;&#xA;  - CONTRACT (version 1)&#xD;&#xA;  - COSTCENTER (version 1)&#xD;&#xA;  - EXCHANGE (version 1)&#xD;&#xA;  - LOCATION (version 1)&#xD;&#xA;  - ORG (version 1)&#xD;&#xA;  - PERSON (version 1)&#xD;&#xA;  - PLANNEDCOST (version 1)&#xD;&#xA;  - PROJECT (version 1)&#xD;&#xA;"/>
</DIProperties>
<DISteps>
<DIParallelStep typeId="11" >
<DISteps>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMEXPENSELINE_SOURCE_EXTRACT_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMEXPENSELINE_SOURCE_EXTRACT_DELETE_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMASSET_SOURCE_EXTRACT_DELETE_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMASSET_SOURCE_EXTRACT_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMMODEL_SOURCE_EXTRACT_DELETE_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMMODEL_SOURCE_EXTRACT_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMNATURE_SOURCE_EXTRACT_DELETE_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMNATURE_SOURCE_EXTRACT_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMPORTFOLIO_SOURCE_EXTRACT_DELETE_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMPORTFOLIO_SOURCE_EXTRACT_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMBUDGLINE_SOURCE_EXTRACT_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMBUDGLINE_SOURCE_EXTRACT_DELETE_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMCONTRACT_SOURCE_EXTRACT_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMCONTRACT_SOURCE_EXTRACT_DELETE_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMCOSTCENTER_SOURCE_EXTRACT_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMCOSTCENTER_SOURCE_EXTRACT_DELETE_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMCURRATE_SOURCE_EXTRACT_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMCOUNTRY_SOURCE_EXTRACT_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMCOUNTRY_SOURCE_EXTRACT_DELETE_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMLOCATION_SOURCE_EXTRACT_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMLOCATION_SOURCE_EXTRACT_DELETE_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMEMPLDEPT_SOURCE_EXTRACT_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMEMPLDEPT_SOURCE_EXTRACT_DELETE_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMCOMPANY_SOURCE_EXTRACT_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMCOMPANY_SOURCE_EXTRACT_DELETE_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMCONTACT_SOURCE_EXTRACT_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMCONTACT_SOURCE_EXTRACT_DELETE_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMBUDGCENTER_SOURCE_EXTRACT_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMBUDGCENTER_SOURCE_EXTRACT_DELETE_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMBUDGET_SOURCE_EXTRACT_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMBUDGET_SOURCE_EXTRACT_DELETE_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMPROJECT_SOURCE_EXTRACT_FF_WF" >
</DICallStep>
<DICallStep typeId="0"  calledObjectType="Workflow" name="AM_AMPROJECT_SOURCE_EXTRACT_DELETE_FF_WF" >
</DICallStep>
</DISteps>
</DIParallelStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIWorkflow name="AM_AMEXPENSELINE_SOURCE_EXTRACT_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMEXPENSELINE_SOURCE_EXTRACT_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMEXPENSELINE_SOURCE_EXTRACT_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMEXPENSELINE';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = 'SRC_LASTMODDATE';&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME,$G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= $L_LASTMODIFIED_COLUMN||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = '*';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMEXPENSELINE'" >
<CONSTANT value="AMEXPENSELINE" datatype="VARCHAR" size="13" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_FF.TXT" datatype="VARCHAR" size="15" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr="'SRC_LASTMODDATE'" >
<CONSTANT value="SRC_LASTMODDATE" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr="(($L_LASTMODIFIED_COLUMN || ' &gt; ') || $L_EXTRACT_BEGIN_DATE_STR)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<CONSTANT value=" &gt; " datatype="VARCHAR" size="3" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE_STR" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'*'" >
<CONSTANT value="*" datatype="VARCHAR" size="1" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMEXPENSELINE_SOURCE_EXTRACT_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMEXPENSELINE_SOURCE_EXTRACT_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMEXPENSELINE_SOURCE_EXTRACT_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMEXPENSELINE_SOURCE_EXTRACT_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMEXPENSELINE_SOURCE_EXTRACT_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMEXPENSELINE_SOURCE_EXTRACT_DELETE_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMEXPENSELINE_SOURCE_EXTRACT_DELETE_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMEXPENSELINE_SOURCE_EXTRACT_DELETE_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMEXPENSELINE';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_DELETE_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = NULL;&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME, $G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= NULL;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = 'MD_BUSINESS_KEY';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMEXPENSELINE'" >
<CONSTANT value="AMEXPENSELINE" datatype="VARCHAR" size="13" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_DELETE_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_DELETE_FF.TXT" datatype="VARCHAR" size="22" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'MD_BUSINESS_KEY'" >
<CONSTANT value="MD_BUSINESS_KEY" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMEXPENSELINE_SOURCE_EXTRACT_DELETE_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMEXPENSELINE_SOURCE_EXTRACT_DELETE_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#xD;&#xA;&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMEXPENSELINE_SOURCE_EXTRACT_DELETE_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMEXPENSELINE_SOURCE_EXTRACT_DELETE_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMEXPENSELINE_SOURCE_EXTRACT_DELETE_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMASSET_SOURCE_EXTRACT_DELETE_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="30" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMASSET_SOURCE_EXTRACT_DELETE_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMASSET_SOURCE_EXTRACT_DELETE_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMASSET';&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_DELETE_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = NULL;&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME, $G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= NULL;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = 'LASTID';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMASSET'" >
<CONSTANT value="AMASSET" datatype="VARCHAR" size="7" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_DELETE_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_DELETE_FF.TXT" datatype="VARCHAR" size="22" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'LASTID'" >
<CONSTANT value="LASTID" datatype="VARCHAR" size="6" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMASSET_SOURCE_EXTRACT_DELETE_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMASSET_SOURCE_EXTRACT_DELETE_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: '||$L_EXTRACT_BATCH||'. You can run the command manually using the following command: '||$L_BATCH_FILE);&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != ' 0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value=" 0: " datatype="VARCHAR" size="4" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR - EXTRACT BATCH !!! The command &gt;&gt;&lt;&lt; is failed !!! The command return the error &gt;&gt;-&lt;&gt;-&lt;&lt;. CHECK IT!!!')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR - EXTRACT BATCH !!! The command &gt;&gt;&lt;&lt; is failed !!! The command return the error &gt;&gt;-&lt;&gt;-&lt;&lt;. CHECK IT!!!" datatype="VARCHAR" size="107" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS. This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMASSET_SOURCE_EXTRACT_DELETE_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMASSET_SOURCE_EXTRACT_DELETE_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMASSET_SOURCE_EXTRACT_DELETE_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="50" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>Yes</auto_correct_using_merge>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>no</ignore_columns_null>
                <loader_auto_correct>yes</loader_auto_correct>
                <loader_bulk_load>0</loader_bulk_load>
                <loader_compare_column>compare_by_name</loader_compare_column>
                <loader_drop_and_create_table>no</loader_drop_and_create_table>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>DW_ABC_DS_DW_ABC_ALIAS_INSTRUCTION.txt</loader_overflow_file>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>no</loader_update_key_columns>
                <loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>Write data</overflow_file_format>
                <use_overflow_file>no</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Audit" hasNestedXMLTree ="true">
<Audit>
          <AuditObjects/>
          <AuditRules/>
          <Notifications>
            <RaiseException Enabled="true"/>
            <Mail Enabled="false"/>
            <Script Enabled="false"/>
          </Notifications>
        </Audit>
</DIAttribute>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMASSET_SOURCE_EXTRACT_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="30" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMASSET_SOURCE_EXTRACT_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMASSET_SOURCE_EXTRACT_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMASSET';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = 'SRC_LASTMODDATE';&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME, $G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CRITERIA TEMPLATE: $L_CRITERIA= $L_LASTMODIFIED_COLUMN||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= $L_LASTMODIFIED_COLUMN||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = '*';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMASSET'" >
<CONSTANT value="AMASSET" datatype="VARCHAR" size="7" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_FF.TXT" datatype="VARCHAR" size="15" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr="'SRC_LASTMODDATE'" >
<CONSTANT value="SRC_LASTMODDATE" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr="(($L_LASTMODIFIED_COLUMN || ' &gt; ') || $L_EXTRACT_BEGIN_DATE_STR)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<CONSTANT value=" &gt; " datatype="VARCHAR" size="3" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE_STR" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'*'" >
<CONSTANT value="*" datatype="VARCHAR" size="1" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMASSET_SOURCE_EXTRACT_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMASSET_SOURCE_EXTRACT_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: '||$L_EXTRACT_BATCH||'. You can run the command manually using the following command: '||$L_BATCH_FILE);&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception(((('ERROR- Extractor failed with the following message: ' || $L_EXTRACT_BATCH) || '. You can run the command manually using the following command: ') || $L_BATCH_FILE))" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="ERROR- Extractor failed with the following message: " datatype="VARCHAR" size="52" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
</CONCAT>
<CONSTANT value=". You can run the command manually using the following command: " datatype="VARCHAR" size="64" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS. This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMASSET_SOURCE_EXTRACT_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMASSET_SOURCE_EXTRACT_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMASSET_SOURCE_EXTRACT_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="50" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>Yes</auto_correct_using_merge>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>no</ignore_columns_null>
                <loader_auto_correct>yes</loader_auto_correct>
                <loader_bulk_load>0</loader_bulk_load>
                <loader_compare_column>compare_by_name</loader_compare_column>
                <loader_drop_and_create_table>no</loader_drop_and_create_table>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>DW_ABC_DS_DW_ABC_ALIAS_INSTRUCTION.txt</loader_overflow_file>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>no</loader_update_key_columns>
                <loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>Write data</overflow_file_format>
                <use_overflow_file>no</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMMODEL_SOURCE_EXTRACT_DELETE_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="30" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMMODEL_SOURCE_EXTRACT_DELETE_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMMODEL_SOURCE_EXTRACT_DELETE_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMMODEL';&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_DELETE_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = NULL;&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME, $G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= NULL;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = 'LMODELID';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMMODEL'" >
<CONSTANT value="AMMODEL" datatype="VARCHAR" size="7" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_DELETE_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_DELETE_FF.TXT" datatype="VARCHAR" size="22" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'LMODELID'" >
<CONSTANT value="LMODELID" datatype="VARCHAR" size="8" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMMODEL_SOURCE_EXTRACT_DELETE_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMMODEL_SOURCE_EXTRACT_DELETE_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: '||$L_EXTRACT_BATCH||'. You can run the command manually using the following command: '||$L_BATCH_FILE);&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != ' 0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value=" 0: " datatype="VARCHAR" size="4" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR - EXTRACT BATCH !!! The command &gt;&gt;&lt;&lt; is failed !!! The command return the error &gt;&gt;-&lt;&gt;-&lt;&lt;. CHECK IT!!!')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR - EXTRACT BATCH !!! The command &gt;&gt;&lt;&lt; is failed !!! The command return the error &gt;&gt;-&lt;&gt;-&lt;&lt;. CHECK IT!!!" datatype="VARCHAR" size="107" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS. This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMMODEL_SOURCE_EXTRACT_DELETE_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMMODEL_SOURCE_EXTRACT_DELETE_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMMODEL_SOURCE_EXTRACT_DELETE_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="50" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>Yes</auto_correct_using_merge>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>no</ignore_columns_null>
                <loader_auto_correct>yes</loader_auto_correct>
                <loader_bulk_load>0</loader_bulk_load>
                <loader_compare_column>compare_by_name</loader_compare_column>
                <loader_drop_and_create_table>no</loader_drop_and_create_table>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>DW_ABC_DS_DW_ABC_ALIAS_INSTRUCTION.txt</loader_overflow_file>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>no</loader_update_key_columns>
                <loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>Write data</overflow_file_format>
                <use_overflow_file>no</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Audit" hasNestedXMLTree ="true">
<Audit>
          <AuditObjects/>
          <AuditRules/>
          <Notifications>
            <RaiseException Enabled="true"/>
            <Mail Enabled="false"/>
            <Script Enabled="false"/>
          </Notifications>
        </Audit>
</DIAttribute>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMMODEL_SOURCE_EXTRACT_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="30" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMMODEL_SOURCE_EXTRACT_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMMODEL_SOURCE_EXTRACT_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMMODEL';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = 'SRC_LASTMODDATE';&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME, $G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CRITERIA TEMPLATE: $L_CRITERIA= $L_LASTMODIFIED_COLUMN||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= $L_LASTMODIFIED_COLUMN||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = '*';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMMODEL'" >
<CONSTANT value="AMMODEL" datatype="VARCHAR" size="7" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_FF.TXT" datatype="VARCHAR" size="15" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr="'SRC_LASTMODDATE'" >
<CONSTANT value="SRC_LASTMODDATE" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr="(($L_LASTMODIFIED_COLUMN || ' &gt; ') || $L_EXTRACT_BEGIN_DATE_STR)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<CONSTANT value=" &gt; " datatype="VARCHAR" size="3" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE_STR" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'*'" >
<CONSTANT value="*" datatype="VARCHAR" size="1" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMMODEL_SOURCE_EXTRACT_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMMODEL_SOURCE_EXTRACT_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: '||$L_EXTRACT_BATCH||'. You can run the command manually using the following command: '||$L_BATCH_FILE);&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception(((('ERROR- Extractor failed with the following message: ' || $L_EXTRACT_BATCH) || '. You can run the command manually using the following command: ') || $L_BATCH_FILE))" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="ERROR- Extractor failed with the following message: " datatype="VARCHAR" size="52" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
</CONCAT>
<CONSTANT value=". You can run the command manually using the following command: " datatype="VARCHAR" size="64" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS. This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMMODEL_SOURCE_EXTRACT_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMMODEL_SOURCE_EXTRACT_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMMODEL_SOURCE_EXTRACT_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="50" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>Yes</auto_correct_using_merge>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>no</ignore_columns_null>
                <loader_auto_correct>yes</loader_auto_correct>
                <loader_bulk_load>0</loader_bulk_load>
                <loader_compare_column>compare_by_name</loader_compare_column>
                <loader_drop_and_create_table>no</loader_drop_and_create_table>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>DW_ABC_DS_DW_ABC_ALIAS_INSTRUCTION.txt</loader_overflow_file>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>no</loader_update_key_columns>
                <loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>Write data</overflow_file_format>
                <use_overflow_file>no</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMNATURE_SOURCE_EXTRACT_DELETE_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="30" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMNATURE_SOURCE_EXTRACT_DELETE_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMNATURE_SOURCE_EXTRACT_DELETE_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMNATURE';&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_DELETE_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = NULL;&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME, $G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= NULL;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = 'LNATUREID';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMNATURE'" >
<CONSTANT value="AMNATURE" datatype="VARCHAR" size="8" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_DELETE_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_DELETE_FF.TXT" datatype="VARCHAR" size="22" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'LNATUREID'" >
<CONSTANT value="LNATUREID" datatype="VARCHAR" size="9" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMNATURE_SOURCE_EXTRACT_DELETE_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMNATURE_SOURCE_EXTRACT_DELETE_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: '||$L_EXTRACT_BATCH||'. You can run the command manually using the following command: '||$L_BATCH_FILE);&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != ' 0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value=" 0: " datatype="VARCHAR" size="4" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR - EXTRACT BATCH !!! The command &gt;&gt;&lt;&lt; is failed !!! The command return the error &gt;&gt;-&lt;&gt;-&lt;&lt;. CHECK IT!!!')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR - EXTRACT BATCH !!! The command &gt;&gt;&lt;&lt; is failed !!! The command return the error &gt;&gt;-&lt;&gt;-&lt;&lt;. CHECK IT!!!" datatype="VARCHAR" size="107" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS. This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMNATURE_SOURCE_EXTRACT_DELETE_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMNATURE_SOURCE_EXTRACT_DELETE_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMNATURE_SOURCE_EXTRACT_DELETE_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="50" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>Yes</auto_correct_using_merge>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>no</ignore_columns_null>
                <loader_auto_correct>yes</loader_auto_correct>
                <loader_bulk_load>0</loader_bulk_load>
                <loader_compare_column>compare_by_name</loader_compare_column>
                <loader_drop_and_create_table>no</loader_drop_and_create_table>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>DW_ABC_DS_DW_ABC_ALIAS_INSTRUCTION.txt</loader_overflow_file>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>no</loader_update_key_columns>
                <loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>Write data</overflow_file_format>
                <use_overflow_file>no</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Audit" hasNestedXMLTree ="true">
<Audit>
          <AuditObjects/>
          <AuditRules/>
          <Notifications>
            <RaiseException Enabled="true"/>
            <Mail Enabled="false"/>
            <Script Enabled="false"/>
          </Notifications>
        </Audit>
</DIAttribute>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMNATURE_SOURCE_EXTRACT_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="30" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMNATURE_SOURCE_EXTRACT_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMNATURE_SOURCE_EXTRACT_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMNATURE';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = 'SRC_LASTMODDATE';&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME, $G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CRITERIA TEMPLATE: $L_CRITERIA= $L_LASTMODIFIED_COLUMN||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= $L_LASTMODIFIED_COLUMN||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = '*';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMNATURE'" >
<CONSTANT value="AMNATURE" datatype="VARCHAR" size="8" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_FF.TXT" datatype="VARCHAR" size="15" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr="'SRC_LASTMODDATE'" >
<CONSTANT value="SRC_LASTMODDATE" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr="(($L_LASTMODIFIED_COLUMN || ' &gt; ') || $L_EXTRACT_BEGIN_DATE_STR)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<CONSTANT value=" &gt; " datatype="VARCHAR" size="3" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE_STR" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'*'" >
<CONSTANT value="*" datatype="VARCHAR" size="1" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMNATURE_SOURCE_EXTRACT_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMNATURE_SOURCE_EXTRACT_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: '||$L_EXTRACT_BATCH||'. You can run the command manually using the following command: '||$L_BATCH_FILE);&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception(((('ERROR- Extractor failed with the following message: ' || $L_EXTRACT_BATCH) || '. You can run the command manually using the following command: ') || $L_BATCH_FILE))" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="ERROR- Extractor failed with the following message: " datatype="VARCHAR" size="52" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
</CONCAT>
<CONSTANT value=". You can run the command manually using the following command: " datatype="VARCHAR" size="64" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS. This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMNATURE_SOURCE_EXTRACT_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMNATURE_SOURCE_EXTRACT_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMNATURE_SOURCE_EXTRACT_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="50" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>Yes</auto_correct_using_merge>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>no</ignore_columns_null>
                <loader_auto_correct>yes</loader_auto_correct>
                <loader_bulk_load>0</loader_bulk_load>
                <loader_compare_column>compare_by_name</loader_compare_column>
                <loader_drop_and_create_table>no</loader_drop_and_create_table>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>DW_ABC_DS_DW_ABC_ALIAS_INSTRUCTION.txt</loader_overflow_file>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>no</loader_update_key_columns>
                <loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>Write data</overflow_file_format>
                <use_overflow_file>no</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMPORTFOLIO_SOURCE_EXTRACT_DELETE_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="30" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMPORTFOLIO_SOURCE_EXTRACT_DELETE_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMPORTFOLIO_SOURCE_EXTRACT_DELETE_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMPORTFOLIO';&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_DELETE_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = NULL;&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME, $G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= NULL;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = 'LPORTFOLIOITEMID';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMPORTFOLIO'" >
<CONSTANT value="AMPORTFOLIO" datatype="VARCHAR" size="11" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_DELETE_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_DELETE_FF.TXT" datatype="VARCHAR" size="22" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'LPORTFOLIOITEMID'" >
<CONSTANT value="LPORTFOLIOITEMID" datatype="VARCHAR" size="16" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMPORTFOLIO_SOURCE_EXTRACT_DELETE_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMPORTFOLIO_SOURCE_EXTRACT_DELETE_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: '||$L_EXTRACT_BATCH||'. You can run the command manually using the following command: '||$L_BATCH_FILE);&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != ' 0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value=" 0: " datatype="VARCHAR" size="4" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR - EXTRACT BATCH !!! The command &gt;&gt;&lt;&lt; is failed !!! The command return the error &gt;&gt;-&lt;&gt;-&lt;&lt;. CHECK IT!!!')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR - EXTRACT BATCH !!! The command &gt;&gt;&lt;&lt; is failed !!! The command return the error &gt;&gt;-&lt;&gt;-&lt;&lt;. CHECK IT!!!" datatype="VARCHAR" size="107" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS. This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMPORTFOLIO_SOURCE_EXTRACT_DELETE_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMPORTFOLIO_SOURCE_EXTRACT_DELETE_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMPORTFOLIO_SOURCE_EXTRACT_DELETE_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="50" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>Yes</auto_correct_using_merge>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>no</ignore_columns_null>
                <loader_auto_correct>yes</loader_auto_correct>
                <loader_bulk_load>0</loader_bulk_load>
                <loader_compare_column>compare_by_name</loader_compare_column>
                <loader_drop_and_create_table>no</loader_drop_and_create_table>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>DW_ABC_DS_DW_ABC_ALIAS_INSTRUCTION.txt</loader_overflow_file>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>no</loader_update_key_columns>
                <loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>Write data</overflow_file_format>
                <use_overflow_file>no</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Audit" hasNestedXMLTree ="true">
<Audit>
          <AuditObjects/>
          <AuditRules/>
          <Notifications>
            <RaiseException Enabled="true"/>
            <Mail Enabled="false"/>
            <Script Enabled="false"/>
          </Notifications>
        </Audit>
</DIAttribute>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMPORTFOLIO_SOURCE_EXTRACT_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="30" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMPORTFOLIO_SOURCE_EXTRACT_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMPORTFOLIO_SOURCE_EXTRACT_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMPORTFOLIO';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = 'SRC_LASTMODDATE';&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME, $G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CRITERIA TEMPLATE: $L_CRITERIA= $L_LASTMODIFIED_COLUMN||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= $L_LASTMODIFIED_COLUMN||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = '*';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMPORTFOLIO'" >
<CONSTANT value="AMPORTFOLIO" datatype="VARCHAR" size="11" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_FF.TXT" datatype="VARCHAR" size="15" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr="'SRC_LASTMODDATE'" >
<CONSTANT value="SRC_LASTMODDATE" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr="(($L_LASTMODIFIED_COLUMN || ' &gt; ') || $L_EXTRACT_BEGIN_DATE_STR)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<CONSTANT value=" &gt; " datatype="VARCHAR" size="3" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE_STR" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'*'" >
<CONSTANT value="*" datatype="VARCHAR" size="1" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMPORTFOLIO_SOURCE_EXTRACT_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMPORTFOLIO_SOURCE_EXTRACT_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: '||$L_EXTRACT_BATCH||'. You can run the command manually using the following command: '||$L_BATCH_FILE);&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception(((('ERROR- Extractor failed with the following message: ' || $L_EXTRACT_BATCH) || '. You can run the command manually using the following command: ') || $L_BATCH_FILE))" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="ERROR- Extractor failed with the following message: " datatype="VARCHAR" size="52" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
</CONCAT>
<CONSTANT value=". You can run the command manually using the following command: " datatype="VARCHAR" size="64" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS. This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMPORTFOLIO_SOURCE_EXTRACT_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMPORTFOLIO_SOURCE_EXTRACT_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMPORTFOLIO_SOURCE_EXTRACT_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="50" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
              <LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
                <auto_correct_using_merge>Yes</auto_correct_using_merge>
                <enable_partitioning>no</enable_partitioning>
                <ignore_column_case>yes</ignore_column_case>
                <ignore_columns_null>no</ignore_columns_null>
                <loader_auto_correct>yes</loader_auto_correct>
                <loader_bulk_load>0</loader_bulk_load>
                <loader_compare_column>compare_by_name</loader_compare_column>
                <loader_drop_and_create_table>no</loader_drop_and_create_table>
                <loader_load_choice>append</loader_load_choice>
                <loader_num_parallel_loaders>1</loader_num_parallel_loaders>
                <loader_overflow_file>DW_ABC_DS_DW_ABC_ALIAS_INSTRUCTION.txt</loader_overflow_file>
                <loader_quote_names>0</loader_quote_names>
                <loader_transactional>no</loader_transactional>
                <loader_transactional_order>0</loader_transactional_order>
                <loader_update_key_columns>no</loader_update_key_columns>
                <loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
                <loader_xact_size>1000</loader_xact_size>
                <mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
                <mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
                <overflow_file_format>Write data</overflow_file_format>
                <use_overflow_file>no</use_overflow_file>
                <use_unicode_varchar>no</use_unicode_varchar>
              </LDRConfiguration>
            </LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMBUDGLINE_SOURCE_EXTRACT_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGLINE_SOURCE_EXTRACT_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGLINE_SOURCE_EXTRACT_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMBUDGLINE';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = 'SRC_LASTMODDATE';&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME,$G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= $L_LASTMODIFIED_COLUMN||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = '*';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMBUDGLINE'" >
<CONSTANT value="AMBUDGLINE" datatype="VARCHAR" size="10" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_FF.TXT" datatype="VARCHAR" size="15" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr="'SRC_LASTMODDATE'" >
<CONSTANT value="SRC_LASTMODDATE" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr="(($L_LASTMODIFIED_COLUMN || ' &gt; ') || $L_EXTRACT_BEGIN_DATE_STR)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<CONSTANT value=" &gt; " datatype="VARCHAR" size="3" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE_STR" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'*'" >
<CONSTANT value="*" datatype="VARCHAR" size="1" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMBUDGLINE_SOURCE_EXTRACT_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGLINE_SOURCE_EXTRACT_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#x9;&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGLINE_SOURCE_EXTRACT_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGLINE_SOURCE_EXTRACT_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMBUDGLINE_SOURCE_EXTRACT_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMBUDGLINE_SOURCE_EXTRACT_DELETE_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGLINE_SOURCE_EXTRACT_DELETE_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGLINE_SOURCE_EXTRACT_DELETE_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMBUDGLINE';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_DELETE_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = NULL;&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME, $G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= NULL;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = 'MD_BUSINESS_KEY';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMBUDGLINE'" >
<CONSTANT value="AMBUDGLINE" datatype="VARCHAR" size="10" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_DELETE_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_DELETE_FF.TXT" datatype="VARCHAR" size="22" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'MD_BUSINESS_KEY'" >
<CONSTANT value="MD_BUSINESS_KEY" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMBUDGLINE_SOURCE_EXTRACT_DELETE_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGLINE_SOURCE_EXTRACT_DELETE_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#x9;&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGLINE_SOURCE_EXTRACT_DELETE_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGLINE_SOURCE_EXTRACT_DELETE_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMBUDGLINE_SOURCE_EXTRACT_DELETE_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMCONTRACT_SOURCE_EXTRACT_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMCONTRACT_SOURCE_EXTRACT_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMCONTRACT_SOURCE_EXTRACT_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMCONTRACT';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = 'SRC_LASTMODDATE';&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME,$G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= $L_LASTMODIFIED_COLUMN||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = '*';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMCONTRACT'" >
<CONSTANT value="AMCONTRACT" datatype="VARCHAR" size="10" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_FF.TXT" datatype="VARCHAR" size="15" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr="'SRC_LASTMODDATE'" >
<CONSTANT value="SRC_LASTMODDATE" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr="(($L_LASTMODIFIED_COLUMN || ' &gt; ') || $L_EXTRACT_BEGIN_DATE_STR)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<CONSTANT value=" &gt; " datatype="VARCHAR" size="3" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE_STR" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'*'" >
<CONSTANT value="*" datatype="VARCHAR" size="1" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMCONTRACT_SOURCE_EXTRACT_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMCONTRACT_SOURCE_EXTRACT_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMCONTRACT_SOURCE_EXTRACT_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMCONTRACT_SOURCE_EXTRACT_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMCONTRACT_SOURCE_EXTRACT_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMCONTRACT_SOURCE_EXTRACT_DELETE_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMCONTRACT_SOURCE_EXTRACT_DELETE_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMCONTRACT_SOURCE_EXTRACT_DELETE_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMCONTRACT';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_DELETE_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = NULL;&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME, $G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= NULL;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = 'MD_BUSINESS_KEY';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMCONTRACT'" >
<CONSTANT value="AMCONTRACT" datatype="VARCHAR" size="10" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_DELETE_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_DELETE_FF.TXT" datatype="VARCHAR" size="22" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'MD_BUSINESS_KEY'" >
<CONSTANT value="MD_BUSINESS_KEY" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMCONTRACT_SOURCE_EXTRACT_DELETE_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMCONTRACT_SOURCE_EXTRACT_DELETE_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMCONTRACT_SOURCE_EXTRACT_DELETE_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMCONTRACT_SOURCE_EXTRACT_DELETE_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMCONTRACT_SOURCE_EXTRACT_DELETE_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMCOSTCENTER_SOURCE_EXTRACT_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMCOSTCENTER_SOURCE_EXTRACT_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMCOSTCENTER_SOURCE_EXTRACT_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMCOSTCENTER';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = 'SRC_LASTMODDATE';&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME,$G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= $L_LASTMODIFIED_COLUMN||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = '*';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMCOSTCENTER'" >
<CONSTANT value="AMCOSTCENTER" datatype="VARCHAR" size="12" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_FF.TXT" datatype="VARCHAR" size="15" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr="'SRC_LASTMODDATE'" >
<CONSTANT value="SRC_LASTMODDATE" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr="(($L_LASTMODIFIED_COLUMN || ' &gt; ') || $L_EXTRACT_BEGIN_DATE_STR)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<CONSTANT value=" &gt; " datatype="VARCHAR" size="3" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE_STR" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'*'" >
<CONSTANT value="*" datatype="VARCHAR" size="1" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMCOSTCENTER_SOURCE_EXTRACT_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMCOSTCENTER_SOURCE_EXTRACT_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMCOSTCENTER_SOURCE_EXTRACT_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMCOSTCENTER_SOURCE_EXTRACT_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMCOSTCENTER_SOURCE_EXTRACT_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMCOSTCENTER_SOURCE_EXTRACT_DELETE_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMCOSTCENTER_SOURCE_EXTRACT_DELETE_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMCOSTCENTER_SOURCE_EXTRACT_DELETE_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMCOSTCENTER';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_DELETE_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = NULL;&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME, $G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= NULL;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = 'MD_BUSINESS_KEY';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMCOSTCENTER'" >
<CONSTANT value="AMCOSTCENTER" datatype="VARCHAR" size="12" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_DELETE_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_DELETE_FF.TXT" datatype="VARCHAR" size="22" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'MD_BUSINESS_KEY'" >
<CONSTANT value="MD_BUSINESS_KEY" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMCOSTCENTER_SOURCE_EXTRACT_DELETE_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMCOSTCENTER_SOURCE_EXTRACT_DELETE_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMCOSTCENTER_SOURCE_EXTRACT_DELETE_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMCOSTCENTER_SOURCE_EXTRACT_DELETE_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMCOSTCENTER_SOURCE_EXTRACT_DELETE_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMCURRATE_SOURCE_EXTRACT_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMCURRATE_SOURCE_EXTRACT_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMCURRATE_SOURCE_EXTRACT_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMCURRATE';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = 'SRC_LASTMODDATE';&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME,$G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= $L_LASTMODIFIED_COLUMN||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = '*';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMCURRATE'" >
<CONSTANT value="AMCURRATE" datatype="VARCHAR" size="9" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_FF.TXT" datatype="VARCHAR" size="15" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr="'SRC_LASTMODDATE'" >
<CONSTANT value="SRC_LASTMODDATE" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr="(($L_LASTMODIFIED_COLUMN || ' &gt; ') || $L_EXTRACT_BEGIN_DATE_STR)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<CONSTANT value=" &gt; " datatype="VARCHAR" size="3" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE_STR" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'*'" >
<CONSTANT value="*" datatype="VARCHAR" size="1" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMCURRATE_SOURCE_EXTRACT_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMCURRATE_SOURCE_EXTRACT_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMCURRATE_SOURCE_EXTRACT_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMCURRATE_SOURCE_EXTRACT_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMCURRATE_SOURCE_EXTRACT_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMCOUNTRY_SOURCE_EXTRACT_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMCOUNTRY_SOURCE_EXTRACT_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMCOUNTRY_SOURCE_EXTRACT_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMCOUNTRY';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = 'SRC_LASTMODDATE';&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME,$G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= $L_LASTMODIFIED_COLUMN||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = '*';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMCOUNTRY'" >
<CONSTANT value="AMCOUNTRY" datatype="VARCHAR" size="9" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_FF.TXT" datatype="VARCHAR" size="15" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr="'SRC_LASTMODDATE'" >
<CONSTANT value="SRC_LASTMODDATE" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr="(($L_LASTMODIFIED_COLUMN || ' &gt; ') || $L_EXTRACT_BEGIN_DATE_STR)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<CONSTANT value=" &gt; " datatype="VARCHAR" size="3" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE_STR" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'*'" >
<CONSTANT value="*" datatype="VARCHAR" size="1" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMCOUNTRY_SOURCE_EXTRACT_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMCOUNTRY_SOURCE_EXTRACT_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#x9;&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMCOUNTRY_SOURCE_EXTRACT_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMCOUNTRY_SOURCE_EXTRACT_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMCOUNTRY_SOURCE_EXTRACT_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMCOUNTRY_SOURCE_EXTRACT_DELETE_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMCOUNTRY_SOURCE_EXTRACT_DELETE_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMCOUNTRY_SOURCE_EXTRACT_DELETE_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMCOUNTRY';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_DELETE_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = NULL;&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME, $G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= NULL;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = 'MD_BUSINESS_KEY';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMCOUNTRY'" >
<CONSTANT value="AMCOUNTRY" datatype="VARCHAR" size="9" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_DELETE_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_DELETE_FF.TXT" datatype="VARCHAR" size="22" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'MD_BUSINESS_KEY'" >
<CONSTANT value="MD_BUSINESS_KEY" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMCOUNTRY_SOURCE_EXTRACT_DELETE_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMCOUNTRY_SOURCE_EXTRACT_DELETE_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#x9;&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMCOUNTRY_SOURCE_EXTRACT_DELETE_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMCOUNTRY_SOURCE_EXTRACT_DELETE_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMCOUNTRY_SOURCE_EXTRACT_DELETE_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMLOCATION_SOURCE_EXTRACT_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMLOCATION_SOURCE_EXTRACT_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMLOCATION_SOURCE_EXTRACT_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMLOCATION';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = 'SRC_LASTMODDATE';&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME,$G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= $L_LASTMODIFIED_COLUMN||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = '*';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMLOCATION'" >
<CONSTANT value="AMLOCATION" datatype="VARCHAR" size="10" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_FF.TXT" datatype="VARCHAR" size="15" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr="'SRC_LASTMODDATE'" >
<CONSTANT value="SRC_LASTMODDATE" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr="(($L_LASTMODIFIED_COLUMN || ' &gt; ') || $L_EXTRACT_BEGIN_DATE_STR)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<CONSTANT value=" &gt; " datatype="VARCHAR" size="3" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE_STR" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'*'" >
<CONSTANT value="*" datatype="VARCHAR" size="1" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMLOCATION_SOURCE_EXTRACT_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMLOCATION_SOURCE_EXTRACT_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#x9;&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMLOCATION_SOURCE_EXTRACT_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMLOCATION_SOURCE_EXTRACT_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMLOCATION_SOURCE_EXTRACT_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMLOCATION_SOURCE_EXTRACT_DELETE_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMLOCATION_SOURCE_EXTRACT_DELETE_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMLOCATION_SOURCE_EXTRACT_DELETE_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMLOCATION';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_DELETE_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = NULL;&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME, $G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= NULL;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = 'MD_BUSINESS_KEY';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMLOCATION'" >
<CONSTANT value="AMLOCATION" datatype="VARCHAR" size="10" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_DELETE_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_DELETE_FF.TXT" datatype="VARCHAR" size="22" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'MD_BUSINESS_KEY'" >
<CONSTANT value="MD_BUSINESS_KEY" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMLOCATION_SOURCE_EXTRACT_DELETE_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMLOCATION_SOURCE_EXTRACT_DELETE_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#x9;&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMLOCATION_SOURCE_EXTRACT_DELETE_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMLOCATION_SOURCE_EXTRACT_DELETE_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMLOCATION_SOURCE_EXTRACT_DELETE_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMEMPLDEPT_SOURCE_EXTRACT_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMEMPLDEPT_SOURCE_EXTRACT_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMEMPLDEPT_SOURCE_EXTRACT_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMEMPLDEPT';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = 'SRC_LASTMODDATE';&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME,$G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= $L_LASTMODIFIED_COLUMN||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = '*';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMEMPLDEPT'" >
<CONSTANT value="AMEMPLDEPT" datatype="VARCHAR" size="10" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_FF.TXT" datatype="VARCHAR" size="15" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr="'SRC_LASTMODDATE'" >
<CONSTANT value="SRC_LASTMODDATE" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr="(($L_LASTMODIFIED_COLUMN || ' &gt; ') || $L_EXTRACT_BEGIN_DATE_STR)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<CONSTANT value=" &gt; " datatype="VARCHAR" size="3" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE_STR" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'*'" >
<CONSTANT value="*" datatype="VARCHAR" size="1" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMEMPLDEPT_SOURCE_EXTRACT_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMEMPLDEPT_SOURCE_EXTRACT_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#x9;&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMEMPLDEPT_SOURCE_EXTRACT_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMEMPLDEPT_SOURCE_EXTRACT_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMEMPLDEPT_SOURCE_EXTRACT_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMEMPLDEPT_SOURCE_EXTRACT_DELETE_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMEMPLDEPT_SOURCE_EXTRACT_DELETE_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMEMPLDEPT_SOURCE_EXTRACT_DELETE_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMEMPLDEPT';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_DELETE_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = NULL;&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME, $G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= NULL;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = 'MD_BUSINESS_KEY';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMEMPLDEPT'" >
<CONSTANT value="AMEMPLDEPT" datatype="VARCHAR" size="10" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_DELETE_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_DELETE_FF.TXT" datatype="VARCHAR" size="22" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'MD_BUSINESS_KEY'" >
<CONSTANT value="MD_BUSINESS_KEY" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMEMPLDEPT_SOURCE_EXTRACT_DELETE_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMEMPLDEPT_SOURCE_EXTRACT_DELETE_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#x9;&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMEMPLDEPT_SOURCE_EXTRACT_DELETE_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMEMPLDEPT_SOURCE_EXTRACT_DELETE_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMEMPLDEPT_SOURCE_EXTRACT_DELETE_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMCOMPANY_SOURCE_EXTRACT_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMCOMPANY_SOURCE_EXTRACT_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMCOMPANY_SOURCE_EXTRACT_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMCOMPANY';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = 'SRC_LASTMODDATE';&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME,$G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= $L_LASTMODIFIED_COLUMN||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = '*';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMCOMPANY'" >
<CONSTANT value="AMCOMPANY" datatype="VARCHAR" size="9" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_FF.TXT" datatype="VARCHAR" size="15" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr="'SRC_LASTMODDATE'" >
<CONSTANT value="SRC_LASTMODDATE" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr="(($L_LASTMODIFIED_COLUMN || ' &gt; ') || $L_EXTRACT_BEGIN_DATE_STR)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<CONSTANT value=" &gt; " datatype="VARCHAR" size="3" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE_STR" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'*'" >
<CONSTANT value="*" datatype="VARCHAR" size="1" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMCOMPANY_SOURCE_EXTRACT_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMCOMPANY_SOURCE_EXTRACT_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#x9;&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMCOMPANY_SOURCE_EXTRACT_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMCOMPANY_SOURCE_EXTRACT_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMCOMPANY_SOURCE_EXTRACT_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMCOMPANY_SOURCE_EXTRACT_DELETE_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMCOMPANY_SOURCE_EXTRACT_DELETE_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMCOMPANY_SOURCE_EXTRACT_DELETE_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMCOMPANY';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_DELETE_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = NULL;&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME, $G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= NULL;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = 'MD_BUSINESS_KEY';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMCOMPANY'" >
<CONSTANT value="AMCOMPANY" datatype="VARCHAR" size="9" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_DELETE_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_DELETE_FF.TXT" datatype="VARCHAR" size="22" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'MD_BUSINESS_KEY'" >
<CONSTANT value="MD_BUSINESS_KEY" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMCOMPANY_SOURCE_EXTRACT_DELETE_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMCOMPANY_SOURCE_EXTRACT_DELETE_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMCOMPANY_SOURCE_EXTRACT_DELETE_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMCOMPANY_SOURCE_EXTRACT_DELETE_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMCOMPANY_SOURCE_EXTRACT_DELETE_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMCONTACT_SOURCE_EXTRACT_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMCONTACT_SOURCE_EXTRACT_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMCONTACT_SOURCE_EXTRACT_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMCONTACT';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = 'SRC_LASTMODDATE';&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME,$G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= $L_LASTMODIFIED_COLUMN||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = '*';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMCONTACT'" >
<CONSTANT value="AMCONTACT" datatype="VARCHAR" size="9" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_FF.TXT" datatype="VARCHAR" size="15" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr="'SRC_LASTMODDATE'" >
<CONSTANT value="SRC_LASTMODDATE" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr="(($L_LASTMODIFIED_COLUMN || ' &gt; ') || $L_EXTRACT_BEGIN_DATE_STR)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<CONSTANT value=" &gt; " datatype="VARCHAR" size="3" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE_STR" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'*'" >
<CONSTANT value="*" datatype="VARCHAR" size="1" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMCONTACT_SOURCE_EXTRACT_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMCONTACT_SOURCE_EXTRACT_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#x9;&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMCONTACT_SOURCE_EXTRACT_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMCONTACT_SOURCE_EXTRACT_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMCONTACT_SOURCE_EXTRACT_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMCONTACT_SOURCE_EXTRACT_DELETE_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMCONTACT_SOURCE_EXTRACT_DELETE_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMCONTACT_SOURCE_EXTRACT_DELETE_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMCONTACT';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_DELETE_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = NULL;&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME, $G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= NULL;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = 'MD_BUSINESS_KEY';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMCONTACT'" >
<CONSTANT value="AMCONTACT" datatype="VARCHAR" size="9" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_DELETE_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_DELETE_FF.TXT" datatype="VARCHAR" size="22" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'MD_BUSINESS_KEY'" >
<CONSTANT value="MD_BUSINESS_KEY" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMCONTACT_SOURCE_EXTRACT_DELETE_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMCONTACT_SOURCE_EXTRACT_DELETE_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#x9;&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMCONTACT_SOURCE_EXTRACT_DELETE_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMCONTACT_SOURCE_EXTRACT_DELETE_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMCONTACT_SOURCE_EXTRACT_DELETE_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMBUDGCENTER_SOURCE_EXTRACT_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGCENTER_SOURCE_EXTRACT_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGCENTER_SOURCE_EXTRACT_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMBUDGCENTER';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = 'SRC_LASTMODDATE';&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME,$G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= $L_LASTMODIFIED_COLUMN||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = '*';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMBUDGCENTER'" >
<CONSTANT value="AMBUDGCENTER" datatype="VARCHAR" size="12" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_FF.TXT" datatype="VARCHAR" size="15" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr="'SRC_LASTMODDATE'" >
<CONSTANT value="SRC_LASTMODDATE" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr="(($L_LASTMODIFIED_COLUMN || ' &gt; ') || $L_EXTRACT_BEGIN_DATE_STR)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<CONSTANT value=" &gt; " datatype="VARCHAR" size="3" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE_STR" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'*'" >
<CONSTANT value="*" datatype="VARCHAR" size="1" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMBUDGCENTER_SOURCE_EXTRACT_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGCENTER_SOURCE_EXTRACT_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#x9;&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGCENTER_SOURCE_EXTRACT_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGCENTER_SOURCE_EXTRACT_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMBUDGCENTER_SOURCE_EXTRACT_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMBUDGCENTER_SOURCE_EXTRACT_DELETE_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGCENTER_SOURCE_EXTRACT_DELETE_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGCENTER_SOURCE_EXTRACT_DELETE_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMBUDGCENTER';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_DELETE_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = NULL;&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME, $G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= NULL;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = 'MD_BUSINESS_KEY';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMBUDGCENTER'" >
<CONSTANT value="AMBUDGCENTER" datatype="VARCHAR" size="12" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_DELETE_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_DELETE_FF.TXT" datatype="VARCHAR" size="22" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'MD_BUSINESS_KEY'" >
<CONSTANT value="MD_BUSINESS_KEY" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMBUDGCENTER_SOURCE_EXTRACT_DELETE_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGCENTER_SOURCE_EXTRACT_DELETE_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#x9;&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGCENTER_SOURCE_EXTRACT_DELETE_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGCENTER_SOURCE_EXTRACT_DELETE_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMBUDGCENTER_SOURCE_EXTRACT_DELETE_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMBUDGET_SOURCE_EXTRACT_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGET_SOURCE_EXTRACT_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGET_SOURCE_EXTRACT_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMBUDGET';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = 'SRC_LASTMODDATE';&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME,$G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= $L_LASTMODIFIED_COLUMN||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = '*';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMBUDGET'" >
<CONSTANT value="AMBUDGET" datatype="VARCHAR" size="8" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_FF.TXT" datatype="VARCHAR" size="15" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr="'SRC_LASTMODDATE'" >
<CONSTANT value="SRC_LASTMODDATE" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr="(($L_LASTMODIFIED_COLUMN || ' &gt; ') || $L_EXTRACT_BEGIN_DATE_STR)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<CONSTANT value=" &gt; " datatype="VARCHAR" size="3" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE_STR" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'*'" >
<CONSTANT value="*" datatype="VARCHAR" size="1" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMBUDGET_SOURCE_EXTRACT_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGET_SOURCE_EXTRACT_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#x9;&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGET_SOURCE_EXTRACT_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGET_SOURCE_EXTRACT_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMBUDGET_SOURCE_EXTRACT_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMBUDGET_SOURCE_EXTRACT_DELETE_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGET_SOURCE_EXTRACT_DELETE_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGET_SOURCE_EXTRACT_DELETE_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMBUDGET';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_DELETE_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = NULL;&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME, $G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= NULL;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = 'MD_BUSINESS_KEY';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMBUDGET'" >
<CONSTANT value="AMBUDGET" datatype="VARCHAR" size="8" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_DELETE_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_DELETE_FF.TXT" datatype="VARCHAR" size="22" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'MD_BUSINESS_KEY'" >
<CONSTANT value="MD_BUSINESS_KEY" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMBUDGET_SOURCE_EXTRACT_DELETE_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGET_SOURCE_EXTRACT_DELETE_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#x9;&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGET_SOURCE_EXTRACT_DELETE_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMBUDGET_SOURCE_EXTRACT_DELETE_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMBUDGET_SOURCE_EXTRACT_DELETE_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMPROJECT_SOURCE_EXTRACT_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMPROJECT_SOURCE_EXTRACT_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMPROJECT_SOURCE_EXTRACT_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMPROJECT';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = 'SRC_LASTMODDATE';&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME,$G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= $L_LASTMODIFIED_COLUMN||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = '*';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMPROJECT'" >
<CONSTANT value="AMPROJECT" datatype="VARCHAR" size="9" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_FF.TXT" datatype="VARCHAR" size="15" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr="'SRC_LASTMODDATE'" >
<CONSTANT value="SRC_LASTMODDATE" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr="(($L_LASTMODIFIED_COLUMN || ' &gt; ') || $L_EXTRACT_BEGIN_DATE_STR)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<CONSTANT value=" &gt; " datatype="VARCHAR" size="3" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE_STR" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'*'" >
<CONSTANT value="*" datatype="VARCHAR" size="1" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMPROJECT_SOURCE_EXTRACT_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMPROJECT_SOURCE_EXTRACT_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#x9;&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMPROJECT_SOURCE_EXTRACT_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMPROJECT_SOURCE_EXTRACT_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMPROJECT_SOURCE_EXTRACT_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_AMPROJECT_SOURCE_EXTRACT_DELETE_FF_WF" typeId="2" >
<DIUIOptions>
<DIAnnotation name="ANNOTATION_0"><DIAttribute name="ObjectDesc" value="This workflow houses the source extraction process into a flat file."/>
</DIAnnotation><DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIProperties>
<DIAttribute name="Description" value="This workflow houses the source data extraction process into a flat file."/>
</DIProperties>
<DIVariables>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_DYNAMIC_FILE_LOCATION" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE" datatype="DATETIME" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INPUT_PRODUCTNAME" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BEGIN_DATE_STR" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_WF_NAME" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_LASTMODIFIED_COLUMN" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_INSTRACTION_ID" datatype="INT" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_COLUMNS" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_EXTRACT_BATCH" datatype="VARCHAR" size="4000" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_BATCH_FILE" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="LOCAL" name="$L_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIVariables>
<DISteps>
<DITryStep typeId="13" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The Try of the Try / Catch Block"/>
<DIAttribute name="ui_display_name" value="AM_AMPROJECT_SOURCE_EXTRACT_DELETE_FF_TRY"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that initiates the metadata tracking for the workflow. The script will also be used to populate the local workflow variables."/>
<DIAttribute name="ui_display_name" value="AM_AMPROJECT_SOURCE_EXTRACT_DELETE_FF_START_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK START OF WORKFLOW&#xD;&#xA;$L_WF_NAME = workflow_name()||$G_CONTENT_PACK_ID;&#xD;&#xA;ABC_STARTWF_FN($L_WF_NAME, $G_PROCESS_ID);&#xD;&#xA;&#xD;&#xA;#POPULATE ENTITY NAME&#xD;&#xA;$L_ENTITY_NAME  = 'AMPROJECT';&#xD;&#xA;&#xD;&#xA;# DEFINE FILE LOCATION AND FILE NAME&#xD;&#xA;$L_DYNAMIC_FILE_NAME  =$G_PRODUCT_NAME||'_'||$L_ENTITY_NAME||'_'||$G_CONTENT_PACK_ID||'_EXTRACT_DELETE_FF.TXT';&#xD;&#xA;ETL_PRINT('This Extraction Process will create the files called ' ||$L_DYNAMIC_FILE_NAME); &#xD;&#xA;ETL_PRINT('The File will be located in the '||$G_AM_FILELOCATION  ||' directory.' );&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA SECTION&#xD;&#xA;#------------------------------------------------------------&#xD;&#xA;# Populate datetime column name from TSNP table to be used for extract begin date calculation in delta extractions&#xD;&#xA;$L_LASTMODIFIED_COLUMN = NULL;&#xD;&#xA;&#xD;&#xA;#RDBMS_TYPE&#xD;&#xA;$L_RDBMS_TYPE = FBI_GET_RDBMS_TYPE( $G_PRODUCT_NAME, $G_CONTENT_PACK_ID );&#xD;&#xA;&#xD;&#xA;if ($L_LASTMODIFIED_COLUMN is not null) &#xD;&#xA;&#x9;begin&#xD;&#xA;&#x9;&#x9;CDC_GET_DELTA_START_DATE_FN ($L_EXTRACT_BEGIN_DATE,$G_CONTENT_PACK_ID ,$G_PRODUCT_NAME ,$L_ENTITY_NAME ,$L_LASTMODIFIED_COLUMN ,$G_INITIAL_LOAD_M );&#x9;&#xD;&#xA;&#x9;&#x9;$L_EXTRACT_BEGIN_DATE_STR= FBI_GET_EXT_BEGIN_DATE_SYNTAX ($L_RDBMS_TYPE,$L_EXTRACT_BEGIN_DATE);&#xD;&#xA;&#x9;end&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# CRITERIA TEMPLATE&#xD;&#xA;# BASIC CREATERIA TEMPLATE: $L_CRITERIA= $L_DELTA_COLUMN_NAME||' &gt; '||$L_EXTRACT_BEGIN_DATE_STR;&#xD;&#xA;$L_CRITERIA= NULL;&#xD;&#xA;&#xD;&#xA;#Populate here list of columns from Source model to be extracted- To extract all Source model defined columns populate '*'&#xD;&#xA;$L_COLUMNS = 'MD_BUSINESS_KEY';"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_WF_NAME" >
<DIExpression isString="true" expr="(workflow_name() || $G_CONTENT_PACK_ID)" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_startwf_fn($L_WF_NAME, $G_PROCESS_ID)" >
<FUNCTION_CALL name="abc_startwf_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_ENTITY_NAME" >
<DIExpression isString="true" expr="'AMPROJECT'" >
<CONSTANT value="AMPROJECT" datatype="VARCHAR" size="9" />
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_DYNAMIC_FILE_NAME" >
<DIExpression isString="true" expr="((((($G_PRODUCT_NAME || '_') || $L_ENTITY_NAME) || '_') || $G_CONTENT_PACK_ID) || '_EXTRACT_DELETE_FF.TXT')" >
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</CONCAT>
<CONSTANT value="_" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<CONSTANT value="_EXTRACT_DELETE_FF.TXT" datatype="VARCHAR" size="22" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print(('This Extraction Process will create the files called ' || $L_DYNAMIC_FILE_NAME))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONSTANT value="This Extraction Process will create the files called " datatype="VARCHAR" size="53" />
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="etl_print((('The File will be located in the ' || $G_AM_FILELOCATION) || ' directory.'))" >
<FUNCTION_CALL name="etl_print"  type="DI" >
<CONCAT>
<CONCAT>
<CONSTANT value="The File will be located in the " datatype="VARCHAR" size="32" />
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
</CONCAT>
<CONSTANT value=" directory." datatype="VARCHAR" size="11" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_LASTMODIFIED_COLUMN" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_RDBMS_TYPE" >
<DIExpression isString="true" expr="fbi_get_rdbms_type($G_PRODUCT_NAME, $G_CONTENT_PACK_ID)" >
<FUNCTION_CALL name="fbi_get_rdbms_type"  type="DI" >
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_LASTMODIFIED_COLUMN IS NOT  NULL )" >
<LOGICAL_OP op="IS NOT NULL">
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="cdc_get_delta_start_date_fn($L_EXTRACT_BEGIN_DATE, $G_CONTENT_PACK_ID, $G_PRODUCT_NAME, $L_ENTITY_NAME, $L_LASTMODIFIED_COLUMN, $G_INITIAL_LOAD_M)" >
<FUNCTION_CALL name="cdc_get_delta_start_date_fn"  type="DI" >
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
<VARIABLE_REFERENCE name="$G_PRODUCT_NAME" />
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
<VARIABLE_REFERENCE name="$L_LASTMODIFIED_COLUMN" />
<VARIABLE_REFERENCE name="$G_INITIAL_LOAD_M" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BEGIN_DATE_STR" >
<DIExpression isString="true" expr="fbi_get_ext_begin_date_syntax($L_RDBMS_TYPE, $L_EXTRACT_BEGIN_DATE)" >
<FUNCTION_CALL name="fbi_get_ext_begin_date_syntax"  type="DI" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
<VARIABLE_REFERENCE name="$L_EXTRACT_BEGIN_DATE" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
</DIIf>
<DIElse>
</DIElse>
</DIIfStep>
<DIAssignmentStep typeId="12" variable="$L_CRITERIA" >
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_COLUMNS" >
<DIExpression isString="true" expr="'MD_BUSINESS_KEY'" >
<CONSTANT value="MD_BUSINESS_KEY" datatype="VARCHAR" size="15" />
</DIExpression>
</DIAssignmentStep>
</DIScript>
<DICallStep typeId="1"  calledObjectType="Dataflow" name="AM_AMPROJECT_SOURCE_EXTRACT_DELETE_FF_DF" >
<DIUIOptions>
<DIAttribute name="ParmDefaulted_01" value="FALSE"/>
<DIAttribute name="ParmDefaulted_02" value="FALSE"/>
<DIAttribute name="ParmDefaulted_03" value="FALSE"/>
<DIAttribute name="ParmDefaulted_04" value="FALSE"/>
<DIAttribute name="ParmDefaulted_05" value="FALSE"/>
<DIAttribute name="ParmDefaulted_06" value="FALSE"/>
</DIUIOptions>
<DIParameterValues>
<DIExpression isString="true" expr="$L_CRITERIA" >
<VARIABLE_REFERENCE name="$L_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr="$L_WF_NAME" >
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$L_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$L_DYNAMIC_FILE_NAME" >
<VARIABLE_REFERENCE name="$L_DYNAMIC_FILE_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$L_COLUMNS" >
<VARIABLE_REFERENCE name="$L_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$L_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$L_ENTITY_NAME" />
</DIExpression>
</DIParameterValues>
</DICallStep>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="This script that calls the custom function that closes the metadata records that are part of tracking the workflow process."/>
<DIAttribute name="ui_display_name" value="AM_AMPROJECT_SOURCE_EXTRACT_DELETE_FF_END_SC"/>
<DIAttribute name="ui_script_text" value="# GET INSTRAUCTION_ID&#xD;&#xA;$L_INSTRACTION_ID=FBI_GET_INSTRACTION_ID_FOR_EXTRACT_FILE($G_PROCESS_ID,$L_WF_NAME);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# BUILD CDM COMMEAND TO INVOKE EXTRACTOR&#xD;&#xA;$L_BATCH_FILE = 'call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat '||$L_INSTRACTION_ID;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# EXECUTE INSTRACTOR&#xD;&#xA;$L_EXTRACT_BATCH = exec('CMD', $L_BATCH_FILE ,8);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;# check if extract batch file starting  successfully &#xD;&#xA;if ($L_EXTRACT_BATCH &lt;&gt; '      0: '   )&#xD;&#xA;begin&#xD;&#xA;&#x9;raise_exception( 'ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}');&#x9;&#xD;&#xA;end&#xD;&#xA;else &#xD;&#xA;begin&#xD;&#xA;&#x9;print ('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY');&#x9;&#xD;&#xA;end&#xD;&#xA;&#xD;&#xA;"/>
</DIUIOptions>
<DIAssignmentStep typeId="12" variable="$L_INSTRACTION_ID" >
<DIExpression isString="true" expr="fbi_get_instraction_id_for_extract_file($G_PROCESS_ID, $L_WF_NAME)" >
<FUNCTION_CALL name="fbi_get_instraction_id_for_extract_file"  type="DI" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<VARIABLE_REFERENCE name="$L_WF_NAME" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_BATCH_FILE" >
<DIExpression isString="true" expr="('call %BTOA_HOME%\\DataWarehouse\\bin\\dw_invoke_extraction.bat ' || $L_INSTRACTION_ID)" >
<CONCAT>
<CONSTANT value="call %BTOA_HOME%\DataWarehouse\bin\dw_invoke_extraction.bat " datatype="VARCHAR" size="60" />
<VARIABLE_REFERENCE name="$L_INSTRACTION_ID" />
</CONCAT>
</DIExpression>
</DIAssignmentStep>
<DIAssignmentStep typeId="12" variable="$L_EXTRACT_BATCH" >
<DIExpression isString="true" expr="exec('CMD', $L_BATCH_FILE, 8)" >
<FUNCTION_CALL name="exec"  type="DI" >
<CONSTANT value="CMD" datatype="VARCHAR" size="3" />
<VARIABLE_REFERENCE name="$L_BATCH_FILE" />
<CONSTANT value="8" datatype="INT" />
</FUNCTION_CALL>
</DIExpression>
</DIAssignmentStep>
<DIIfStep typeId="2" >
<DIExpression isString="true" expr="($L_EXTRACT_BATCH != '      0: ')" >
<LOGICAL_OP op="NE">
<VARIABLE_REFERENCE name="$L_EXTRACT_BATCH" />
<CONSTANT value="      0: " datatype="VARCHAR" size="9" />
</LOGICAL_OP>
</DIExpression>
<DIIf>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="raise_exception('ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}')" >
<FUNCTION_CALL name="raise_exception"  type="DI" >
<CONSTANT value="ERROR- Extractor failed with the following message: {$L_EXTRACT_BATCH}. You can run the commange manually using the following command: {$L_BATCH_FILE}" datatype="VARCHAR" size="150" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIIf>
<DIElse>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="print('DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY')" >
<FUNCTION_CALL name="print"  type="DI" >
<CONSTANT value="DW_INVOKE_EXTRACTION.BAT IS STARTING SUCCESSFULLY" datatype="VARCHAR" size="49" />
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIElse>
</DIIfStep>
</DIScript>
</DISteps>
<DICatch typeId="20" errorCode="210101" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
<DIAttribute name="ObjectDesc" value="The workflow catch object is the end of the TRY/CATCH block in BO DS.  This catch block contains the script object that calls a custom fail workflow function used to write the metadata for failed jobs."/>
<DIAttribute name="ui_display_name" value="AM_AMPROJECT_SOURCE_EXTRACT_DELETE_FF_CATCH"/>
</DIUIOptions>
<DISteps>
<DIScript>
<DIUIOptions>
<DIAttribute name="ObjectDesc" value="The script that calls the custom function that is used to write the metadata for failed workflow."/>
<DIAttribute name="ui_display_name" value="AM_AMPROJECT_SOURCE_EXTRACT_DELETE_FF_FAIL_SC"/>
<DIAttribute name="ui_script_text" value="# CALL FUNCTION TO TRACK FAIL OF WORKFLOW&#xD;&#xA;ABC_FAILWF_FN(workflow_name()||$G_CONTENT_PACK_ID, $G_PROCESS_ID, 'Error: \[' || error_number() || '\] ' || error_message());"/>
</DIUIOptions>
<DIFunctionCallStep typeId="23" >
<DIExpression isString="true" expr="abc_failwf_fn((workflow_name() || $G_CONTENT_PACK_ID), $G_PROCESS_ID, ((('Error: \\[' || error_number()) || '\\] ') || error_message()))" >
<FUNCTION_CALL name="abc_failwf_fn"  type="DI" >
<CONCAT>
<FUNCTION_CALL name="workflow_name"  type="DI" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</CONCAT>
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
<CONCAT>
<CONCAT>
<CONCAT>
<CONSTANT value="Error: \[" datatype="VARCHAR" size="9" />
<FUNCTION_CALL name="error_number"  type="DI" />
</CONCAT>
<CONSTANT value="\] " datatype="VARCHAR" size="3" />
</CONCAT>
<FUNCTION_CALL name="error_message"  type="DI" />
</CONCAT>
</FUNCTION_CALL>
</DIExpression>
</DIFunctionCallStep>
</DIScript>
</DISteps>
</DICatch>
</DITryStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>
<DIDataflow name="AM_AMPROJECT_SOURCE_EXTRACT_DELETE_FF_DF" typeId="1" >
<DIUIOptions>
<DIAttribute name="AutoLayout" value="yes"/>
</DIUIOptions>
<DIParameters>
<DIElement paramType="IN" name="$P_CRITERIA" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_WF_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_RDBMS_TYPE" datatype="VARCHAR" size="50" >
</DIElement>
<DIElement paramType="IN" name="$P_DYNAMIC_FILE_NAME" datatype="VARCHAR" size="100" >
</DIElement>
<DIElement paramType="IN" name="$P_COLUMNS" datatype="VARCHAR" size="200" >
</DIElement>
<DIElement paramType="IN" name="$P_ENTITY_NAME" datatype="VARCHAR" size="100" >
</DIElement>
</DIParameters>
<DITransforms>
<DIQuery typeId="122"  >
<DIUIOptions>
<DIAttribute name="ui_acta_from_schema_0" value="DATASOURCECONNECTION"/>
<DIAttribute name="ui_display_name" value="QRY_DATA_POPULATION"/>
<DIAttribute name="ui_where_text" value="DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID"/>
</DIUIOptions>
<DISchema name="QRY_DATA_POPULATION" >
<DIElement name="MD_PROCESS_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_PROCESS_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="STEP_DETAIL_WF_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_WF_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_ID" datatype="INT" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_NAME" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTNAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_VERSION" datatype="VARCHAR" size="30" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="DATASOURCECONNECTION.PRODUCTVERSION&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_TYPE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_RDBMS_TYPE &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="PRODUCT_INSTANCE" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_CONTENT_PACK_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ENTITY" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_ENTITY_NAME&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_FIELDS" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_COLUMNS &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_CRITERIA" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$P_CRITERIA &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_ORDER_BY" datatype="VARCHAR" size="50" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="RESULT_FILE_NAME" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_AM_FILELOCATION ||'\\'||$P_DYNAMIC_FILE_NAME &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="SPECIAL_CHAR_REPLACEMENT" datatype="VARCHAR" size="100" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="NULL"/>
</DIAttributes>
</DIElement>
<DIElement name="FIELD_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NC$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="ROW_DELIMITER" datatype="VARCHAR" size="10" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'!$NL$!'&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="VALIDATION_REQUIRED" datatype="VARCHAR" size="250" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="'false'"/>
</DIAttributes>
</DIElement>
<DIElement name="MD_BATCH_ID" datatype="DECIMAL" precision="19" scale="0" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="$G_BATCH_ID &#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
<DIElement name="INST_TIME_STAMP" datatype="DATETIME" >
<DIAttributes>
<DIAttribute name="Description" value=""/>
<DIAttribute name="ui_mapping_text" value="sysdate( )&#xD;&#xA; &#xD;&#xA;"/>
</DIAttributes>
</DIElement>
</DISchema>
<DISelect>
<DIProjection>
<DIExpression isString="true" expr="$G_PROCESS_ID" >
<VARIABLE_REFERENCE name="$G_PROCESS_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_WF_NAME" >
<VARIABLE_REFERENCE name="$P_WF_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTNAME" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTNAME" />
</DIExpression>
<DIExpression isString="true" expr="DATASOURCECONNECTION.PRODUCTVERSION" >
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="PRODUCTVERSION" />
</DIExpression>
<DIExpression isString="true" expr="$P_RDBMS_TYPE" >
<VARIABLE_REFERENCE name="$P_RDBMS_TYPE" />
</DIExpression>
<DIExpression isString="true" expr="$G_CONTENT_PACK_ID" >
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</DIExpression>
<DIExpression isString="true" expr="$P_ENTITY_NAME" >
<VARIABLE_REFERENCE name="$P_ENTITY_NAME" />
</DIExpression>
<DIExpression isString="true" expr="$P_COLUMNS" >
<VARIABLE_REFERENCE name="$P_COLUMNS" />
</DIExpression>
<DIExpression isString="true" expr="$P_CRITERIA" >
<VARIABLE_REFERENCE name="$P_CRITERIA" />
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="(($G_AM_FILELOCATION || '\\') || $P_DYNAMIC_FILE_NAME)" >
<CONCAT>
<CONCAT>
<VARIABLE_REFERENCE name="$G_AM_FILELOCATION" />
<CONSTANT value="\" datatype="VARCHAR" size="1" />
</CONCAT>
<VARIABLE_REFERENCE name="$P_DYNAMIC_FILE_NAME" />
</CONCAT>
</DIExpression>
<DIExpression isString="true" expr=" NULL " >
<CONSTANT_NULL /></DIExpression>
<DIExpression isString="true" expr="'!$NC$!'" >
<CONSTANT value="!$NC$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'!$NL$!'" >
<CONSTANT value="!$NL$!" datatype="VARCHAR" size="6" />
</DIExpression>
<DIExpression isString="true" expr="'false'" >
<CONSTANT value="false" datatype="VARCHAR" size="5" />
</DIExpression>
<DIExpression isString="true" expr="$G_BATCH_ID" >
<VARIABLE_REFERENCE name="$G_BATCH_ID" />
</DIExpression>
<DIExpression isString="true" expr="sysdate()" >
<FUNCTION_CALL name="sysdate"  type="DI" />
</DIExpression>
</DIProjection>
<DIFrom>
<DITableSpec name="DATASOURCECONNECTION" />
</DIFrom>
<DIWhere>
<DIExpression isString="true" expr="(DATASOURCECONNECTION.CP_ID = $G_CONTENT_PACK_ID)" >
<LOGICAL_OP op="EQ">
<COLUMN_REFERENCE  qualifier1="DATASOURCECONNECTION" column="CP_ID" />
<VARIABLE_REFERENCE name="$G_CONTENT_PACK_ID" />
</LOGICAL_OP>
</DIExpression>
</DIWhere>
</DISelect>
<DIAttributes>
<DIAttribute name="distinct_run_as_separate_process" value="no"/>
<DIAttribute name="group_by_run_as_separate_process" value="no"/>
<DIAttribute name="join_run_as_separate_process" value="no"/>
<DIAttribute name="order_by_run_as_separate_process" value="no"/>
<DIAttribute name="run_as_separate_process" value="no"/>
</DIAttributes>
</DIQuery>

<DIDatabaseTableSource typeId="22" datastoreName="DW_METADATA_DS" ownerName="DW_METADATA_ALIAS" tableName="DATASOURCECONNECTION" >
<DIOutputView name="DATASOURCECONNECTION"  />
<DIAttributes>
<DIAttribute name="array_fetch_size" value="1000"/>
<DIAttribute name="cache" value="yes"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="enable_partitioning" value="no"/>
<DIAttribute name="name" value="DW_METADATA_DS"/>
<DIAttribute name="package_size" value="0"/>
<DIAttribute name="reader_is_DB2CDC_table" value="no"/>
<DIAttribute name="reader_overflow_file" value="overflow_file"/>
<DIAttribute name="reader_template_table" value="no"/>
<DIAttribute name="reader_use_overflow_file" value="no"/>
<DIAttribute name="reader_use_trex_transaction" value="no"/>
<DIAttribute name="table_weight" value="0"/>
</DIAttributes>
</DIDatabaseTableSource>

<DIDatabaseTableTarget typeID="11" bulkLoader="false" datastoreName="DW_ABC_DS" ownerName="DW_ABC_ALIAS" tableName="INSTRUCTION" >
<DIInputView name="QRY_DATA_POPULATION"  />
<DIAttributes>
<DIAttribute name="LDRLiveLoad" value="no"/>
<DIAttribute name="Table_Type" value="TABLE"/>
<DIAttribute name="connection_port" value="no"/>
<DIAttribute name="ldr_configuration_enabled" value="yes"/>
<DIAttribute name="ldr_configurations" hasNestedXMLTree ="true">
<LDRConfigurations>
<LDRConfiguration database_type="Microsoft_SQL_Server" database_version="Microsoft SQL Server 2005">
<auto_correct_using_merge>Yes</auto_correct_using_merge>
<bulk_ldr_all_rows/>
<bulk_ldr_max_errors/>
<bulk_ldr_rows_per_commit/>
<enable_partitioning>no</enable_partitioning>
<ignore_column_case>yes</ignore_column_case>
<ignore_columns_null>yes</ignore_columns_null>
<ignore_columns_value/>
<loader_auto_correct>yes</loader_auto_correct>
<loader_bulk_load>0</loader_bulk_load>
<loader_compare_column>compare_by_name</loader_compare_column>
<loader_delete_map/>
<loader_drop_and_create_table>no</loader_drop_and_create_table>
<loader_insert_map/>
<loader_load_choice>append</loader_load_choice>
<loader_num_parallel_loaders>1</loader_num_parallel_loaders>
<loader_overflow_file>DW_ABC_DS_DWABC_INSTRUCTION.txt</loader_overflow_file>
<loader_post_load1/>
<loader_pre_load1/>
<loader_quote_names>0</loader_quote_names>
<loader_transactional>no</loader_transactional>
<loader_transactional_order>0</loader_transactional_order>
<loader_update_key_columns>no</loader_update_key_columns>
<loader_update_map/>
<loader_use_user_defined_keys>yes</loader_use_user_defined_keys>
<loader_xact_size>1000</loader_xact_size>
<mssql_bulk_ldr_mode>append</mssql_bulk_ldr_mode>
<mssql_bulk_ldr_packet_size>4</mssql_bulk_ldr_packet_size>
<overflow_file_format>Write data</overflow_file_format>
<overriding_substitution_parameter_for_tablename/>
<use_overflow_file>no</use_overflow_file>
<use_unicode_varchar>no</use_unicode_varchar>
<sql_text/>
</LDRConfiguration>
</LDRConfigurations>
</DIAttribute>
<DIAttribute name="loader_template_table" value="no"/>
<DIAttribute name="name" value="DW_ABC_DS"/>
<DIAttribute name="use_unicode_varchar" value="no"/>
</DIAttributes>
</DIDatabaseTableTarget>

</DITransforms>
<DIAttributes>
<DIAttribute name="Cache_type" value="pageable_cache"/>
<DIAttribute name="Parallelism_degree" value="0"/>
<DIAttribute name="allows_both_input_and_output" value="yes"/>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="use_dataflow_links" value="no"/>
<DIAttribute name="use_datastore_links" value="yes"/>
<DIAttribute name="validation_xform_exists" value="no"/>
<DIAttribute name="validation_xform_stats" value="no"/>
</DIAttributes>
</DIDataflow>
<DIWorkflow name="AM_SOURCE_EXTRACT_CUSTOM_CONT_WF" typeId="2" >
<DISteps>
<DIParallelStep typeId="11" >
<DISteps>
</DISteps>
</DIParallelStep>
</DISteps>
<DIAttributes>
<DIAttribute name="run_once" value="no"/>
<DIAttribute name="unit_of_recovery" value="no"/>
</DIAttributes>
</DIWorkflow>

</DataIntegratorExport>

